当前位置: 首页>>代码示例>>C#>>正文


C# Common.Encrypt方法代码示例

本文整理汇总了C#中Common.Encrypt方法的典型用法代码示例。如果您正苦于以下问题:C# Common.Encrypt方法的具体用法?C# Common.Encrypt怎么用?C# Common.Encrypt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Common的用法示例。


在下文中一共展示了Common.Encrypt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: imgSaveAddItem_Click

		protected void imgSaveAddItem_Click(object sender, System.EventArgs e)
		{
			Int64 RetID = SaveRecord();
			Common Common = new Common();
			string stParam = "?task=" + Common.Encrypt("additem",Session.SessionID) + "&retid=" + Common.Encrypt(RetID.ToString(),Session.SessionID) + "#itemsection";	
			Response.Redirect("Default.aspx" + stParam);	
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:7,代码来源:_Insert.ascx.cs

示例2: cmdSave_Click

		protected void cmdSave_Click(object sender, System.EventArgs e)
		{
			SaveRecord();
			Common Common = new Common();
			string stParam = "?task=" + Common.Encrypt("add",Session.SessionID);
			Response.Redirect("Default.aspx" + stParam);
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:7,代码来源:_Update.ascx.cs

示例3: LoadRecord

        private void LoadRecord()
        {
            Common Common = new Common();
            Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["retid"], Session.SessionID));
            SOReturns clsSOReturns = new SOReturns();
            SOReturnDetails clsDetails = clsSOReturns.Details(iID);
            clsSOReturns.CommitAndDispose();

            lblCreditMemoID.Text = clsDetails.CreditMemoID.ToString();
            lnkReturnNo.Text = clsDetails.CNNo;
            lnkReturnNo.NavigateUrl = "Default.aspx?task=" + Common.Encrypt("details", Session.SessionID) + "&retid=" + Common.Encrypt(clsDetails.CreditMemoID.ToString(), Session.SessionID);

            lblReturnDate.Text = clsDetails.CNDate.ToString("yyyy-MM-dd HH:mm:ss");
            txtRequiredReturnDate.Text = clsDetails.RequiredPostingDate.ToString("yyyy-MM-dd");
            cboCustomer.SelectedIndex = cboCustomer.Items.IndexOf(cboCustomer.Items.FindByValue(clsDetails.CustomerID.ToString()));
            txtCustomerContact.Text = clsDetails.CustomerContact;
            txtCustomerTelephoneNo.Text = clsDetails.CustomerTelephoneNo;
            lblTerms.Text = clsDetails.CustomerTerms.ToString("##0");
            switch (clsDetails.CustomerModeOfTerms)
            {
                case 0:
                    lblModeOfterms.Text = "Days";
                    break;
                case 1:
                    lblModeOfterms.Text = "Months";
                    break;
                case 2:
                    lblModeOfterms.Text = "Years";
                    break;
            }
            txtCustomerAddress.Text = clsDetails.CustomerAddress;
            cboBranch.SelectedIndex = cboBranch.Items.IndexOf(cboBranch.Items.FindByValue(clsDetails.BranchID.ToString()));
            txtBranchAddress.Text = clsDetails.BranchAddress;
            txtRemarks.Text = clsDetails.Remarks;
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:35,代码来源:_Update.ascx.cs

示例4: cmdCancel_Click

		protected void cmdCancel_Click(object sender, System.EventArgs e)
		{
			Common Common = new Common();
			Response.Redirect("Default.aspx?task=" + Common.Encrypt("list",Session.SessionID));		
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:5,代码来源:_Details.ascx.cs

示例5: lstItem_ItemDataBound

        protected void lstItem_ItemDataBound(object sender, DataListItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Header)
            {
                LoadSortFieldOptions(e);
            }
            else if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView dr = (DataRowView)e.Item.DataItem;

                HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
                chkList.Value = dr["CreditMemoID"].ToString();

                HyperLink lnkReturnNo = (HyperLink)e.Item.FindControl("lnkReturnNo");
                lnkReturnNo.Text = dr["CNNo"].ToString();
                Common Common = new Common();
                string stParam = "?task=" + Common.Encrypt("details", Session.SessionID) + "&retid=" + Common.Encrypt(chkList.Value.ToString(), Session.SessionID);
                lnkReturnNo.NavigateUrl = "Default.aspx" + stParam;

                Label lblReturnDate = (Label)e.Item.FindControl("lblReturnDate");
                lblReturnDate.Text = Convert.ToDateTime(dr["CNDate"]).ToString("yyyy-MM-dd HH:mm:ss");

                Label lblCustomerID = (Label)e.Item.FindControl("lblCustomerID");
                lblCustomerID.Text = dr["CustomerID"].ToString();

                HyperLink lblCustomerCode = (HyperLink)e.Item.FindControl("lblCustomerCode");
                lblCustomerCode.Text = dr["CustomerCode"].ToString();
                stParam = "?task=" + Common.Encrypt("details", Session.SessionID) + "&id=" + Common.Encrypt(lblCustomerID.Text, Session.SessionID);
                lblCustomerCode.NavigateUrl = Constants.ROOT_DIRECTORY + "/SalesAndReceivables/_Customer/Default.aspx" + stParam;

                Label lblReqReturnDate = (Label)e.Item.FindControl("lblReqReturnDate");
                lblReqReturnDate.Text = Convert.ToDateTime(dr["RequiredPostingDate"]).ToString("yyyy-MM-dd");

                Label lblBranchID = (Label)e.Item.FindControl("lblBranchID");
                lblBranchID.Text = dr["BranchID"].ToString();
                Label lblBranchCode = (Label)e.Item.FindControl("lblBranchCode");
                lblBranchCode.Text = dr["BranchCode"].ToString();

                Label lblSubTotal = (Label)e.Item.FindControl("lblSubTotal");
                lblSubTotal.Text = Convert.ToDecimal(dr["SubTotal"]).ToString("#,##0.#0");

                Label lblRemarks = (Label)e.Item.FindControl("lblRemarks");
                lblRemarks.Text = dr["Remarks"].ToString();

                //For anchor
                //				HtmlGenericControl divExpCollAsst = (HtmlGenericControl) e.Item.FindControl("divExpCollAsst");

                //				HtmlAnchor anchorDown = (HtmlAnchor) e.Item.FindControl("anchorDown");
                //				anchorDown.HRef = "javascript:ToggleDiv('" +  divExpCollAsst.ClientID + "')";
            }
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:51,代码来源:_List.ascx.cs

示例6: LoadSortFieldOptions

        private void LoadSortFieldOptions(DataListItemEventArgs e)
        {
            Common Common = new Common();
            string stParam = "?task=" + Common.Encrypt("list", Session.SessionID); // +"&status=" + cboStatus.SelectedIndex.ToString();

            SortOption sortoption = SortOption.Ascending;
            if (Request.QueryString["sortoption"] != null)
                sortoption = (SortOption)Enum.Parse(typeof(SortOption), Common.Decrypt(Request.QueryString["sortoption"], Session.SessionID), true);

            if (sortoption == SortOption.Ascending)
                stParam += "&sortoption=" + Common.Encrypt(SortOption.Desscending.ToString("G"), Session.SessionID);
            else if (sortoption == SortOption.Desscending)
                stParam += "&sortoption=" + Common.Encrypt(SortOption.Ascending.ToString("G"), Session.SessionID);

            System.Collections.Specialized.NameValueCollection querystrings = Request.QueryString; ;
            foreach (string querystring in querystrings.AllKeys)
            {
                if (querystring.ToLower() != "sortfield" && querystring.ToLower() != "sortoption" && querystring.ToLower() != "task" && querystring.ToLower() != "status")
                    stParam += "&" + querystring + "=" + querystrings[querystring].ToString();
            }

            HyperLink SortByReturnNo = (HyperLink)e.Item.FindControl("SortByReturnNo");
            HyperLink SortByReturnDate = (HyperLink)e.Item.FindControl("SortByReturnDate");
            HyperLink SortByCustomerCode = (HyperLink)e.Item.FindControl("SortByCustomerCode");
            HyperLink SortByReqReturnDate = (HyperLink)e.Item.FindControl("SortByReqReturnDate");
            HyperLink SortByBranchCode = (HyperLink)e.Item.FindControl("SortByBranchCode");
            HyperLink SortBySubTotal = (HyperLink)e.Item.FindControl("SortBySubTotal");
            HyperLink SortByRemarks = (HyperLink)e.Item.FindControl("SortByRemarks");

            SortByReturnNo.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("CNNo", Session.SessionID);
            SortByReturnDate.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("CNDate", Session.SessionID);
            SortByCustomerCode.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("CustomerCode", Session.SessionID);
            SortByReqReturnDate.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("RequiredPostingDate", Session.SessionID);
            SortByBranchCode.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("BranchID", Session.SessionID);
            SortBySubTotal.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("SubTotal", Session.SessionID);
            SortByRemarks.NavigateUrl = "Default.aspx" + stParam + "&sortfield=" + Common.Encrypt("Remarks", Session.SessionID);
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:37,代码来源:_List.ascx.cs

示例7: cmdAdd_Click

		protected void cmdAdd_Click(object sender, System.EventArgs e)
		{
			Common Common = new Common();
            string stParam = "?task=" + Common.Encrypt("add", Session.SessionID) + "&isepurchaseorder=" + Common.Encrypt("true", Session.SessionID);			
			Response.Redirect("Default.aspx" + stParam);
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:6,代码来源:_listesales.ascx.cs

示例8: PrintSOReturn

 private void PrintSOReturn()
 {
     Common Common = new Common();
     string stParam = "?task=" + Common.Encrypt("reports", Session.SessionID) + "&target=" + Common.Encrypt("poretun", Session.SessionID) + "&retid=" + Common.Encrypt(lblCreditMemoID.Text, Session.SessionID);
     Response.Redirect("Default.aspx" + stParam);
 }
开发者ID:marioricci,项目名称:erp-luma,代码行数:6,代码来源:_Details.ascx.cs

示例9: Post

		private void Post()
		{
			DateTime DeliveryDate = Convert.ToDateTime(txtPostDate.Text);

			ERPConfig clsERPConfig = new ERPConfig();
			ERPConfigDetails clsERPConfigDetails = clsERPConfig.Details();
			clsERPConfig.CommitAndDispose();
			
			if (clsERPConfigDetails.PostingDateFrom <= DeliveryDate && clsERPConfigDetails.PostingDateTo >= DeliveryDate)
			{
				long DebitMemoID = Convert.ToInt64(lblDebitMemoID.Text);
				string SupplierDRNo = txtSupplierDocNo.Text;

				DebitMemos clsDebitMemos = new DebitMemos();
				clsDebitMemos.Post(DebitMemoID, SupplierDRNo, DeliveryDate);
				clsDebitMemos.CommitAndDispose();

				Common Common = new Common();
				string stParam = "?task=" + Common.Encrypt("list",Session.SessionID) + "&memoid=" + Common.Encrypt(DebitMemoID.ToString(),Session.SessionID);	
				Response.Redirect("Default.aspx" + stParam);
			}
			else
			{
				string stScript = "<Script>";
				stScript += "window.alert('Sorry you cannot post using the delivery date: " + txtPostDate.Text + ". Please enter an allowable posting date.')";
				stScript += "</Script>";
				Response.Write(stScript);	
			}
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:29,代码来源:_Post.ascx.cs

示例10: UpdateHeader

        private void UpdateHeader()
        {
            string stID = lblTransferOutID.Text;

            Common Common = new Common();
            string stParam = "?task=" + Common.Encrypt("edit", Session.SessionID) + "&TransferOutid=" + Common.Encrypt(stID, Session.SessionID);
            Response.Redirect("Default.aspx" + stParam);
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:8,代码来源:_Post.ascx.cs

示例11: UpdateHeader

        private void UpdateHeader()
        {
            string stID = lblPOID.Text;

            Common Common = new Common();
            string stParam = "?task=" + Common.Encrypt("edit", Session.SessionID) + "&poid=" + Common.Encrypt(stID, Session.SessionID) + "&isepurchaseorder=" + Common.Encrypt(lblIsePurchaseOrder.Text, Session.SessionID);
            Response.Redirect("Default.aspx" + stParam);
        }
开发者ID:marioricci,项目名称:erp-luma,代码行数:8,代码来源:_Post.ascx.cs

示例12: lstItem_ItemDataBound

		protected void lstItem_ItemDataBound(object sender, DataListItemEventArgs e)
		{
			if(e.Item.ItemType == ListItemType.Header)
			{
				LoadSortFieldOptions(e);
			}
			else if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
			{
                DataRowView dr = (DataRowView)e.Item.DataItem;

                HtmlInputCheckBox chkList = (HtmlInputCheckBox)e.Item.FindControl("chkList");
                chkList.Value = dr["TransferOutID"].ToString();

                TransferOutStatus status = (TransferOutStatus)Enum.Parse(typeof(TransferOutStatus), dr["Status"].ToString());
                if (status == TransferOutStatus.Posted || status == TransferOutStatus.Cancelled)
                {
                    chkList.Attributes.Add("disabled", "false");
                    ImageButton imgItemDelete = (ImageButton)e.Item.FindControl("imgItemDelete");
                    ImageButton imgItemEdit = (ImageButton)e.Item.FindControl("imgItemEdit");
                    ImageButton imgItemPost = (ImageButton)e.Item.FindControl("imgItemPost");
                    imgItemDelete.Enabled = false; imgItemDelete.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/blank.gif";
                    imgItemEdit.Enabled = false; imgItemEdit.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/blank.gif";
                    imgItemPost.Enabled = false; imgItemPost.ImageUrl = Constants.ROOT_DIRECTORY + "/_layouts/images/blank.gif";
                }

				HyperLink lnkTransferOutNo = (HyperLink) e.Item.FindControl("lnkTransferOutNo");
				lnkTransferOutNo.Text = dr["TransferOutNo"].ToString();
				Common Common = new Common();
				string stParam = "?task=" + Common.Encrypt("details",Session.SessionID) + "&transferoutid=" + Common.Encrypt(chkList.Value.ToString(),Session.SessionID);
				lnkTransferOutNo.NavigateUrl = "Default.aspx" + stParam;

				Label lblTransferOutDate = (Label) e.Item.FindControl("lblTransferOutDate");
				lblTransferOutDate.Text = Convert.ToDateTime(dr["TransferOutDate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");

				Label lblSupplierID = (Label) e.Item.FindControl("lblSupplierID");
				lblSupplierID.Text = dr["SupplierID"].ToString();

				HyperLink lblSupplierCode = (HyperLink) e.Item.FindControl("lblSupplierCode");
				lblSupplierCode.Text = dr["SupplierCode"].ToString();
				stParam = "?task=" + Common.Encrypt("details",Session.SessionID) + "&id=" + Common.Encrypt(lblSupplierID.Text,Session.SessionID);	
				lblSupplierCode.NavigateUrl = Constants.ROOT_DIRECTORY + "/PurchasesAndPayables/_Vendor/Default.aspx" + stParam;
				
				Label lblReqDeliveryDate = (Label) e.Item.FindControl("lblReqDeliveryDate");
				lblReqDeliveryDate.Text = Convert.ToDateTime(dr["RequiredDeliveryDate"].ToString()).ToString("yyyy-MM-dd");

				Label lblBranchID = (Label) e.Item.FindControl("lblBranchID");
				lblBranchID.Text = dr["BranchID"].ToString();
				Label lblBranchCode = (Label) e.Item.FindControl("lblBranchCode");
				lblBranchCode.Text = dr["BranchCode"].ToString();

				Label lblTransferOutSubTotal = (Label) e.Item.FindControl("lblTransferOutSubTotal");
				lblTransferOutSubTotal.Text = Convert.ToDecimal(dr["SubTotal"].ToString()).ToString("#,##0.#0");

				Label lblTransferOutRemarks = (Label) e.Item.FindControl("lblTransferOutRemarks");
				lblTransferOutRemarks.Text = dr["Remarks"].ToString();

				//For anchor
//				HtmlGenericControl divExpCollAsst = (HtmlGenericControl) e.Item.FindControl("divExpCollAsst");

//				HtmlAnchor anchorDown = (HtmlAnchor) e.Item.FindControl("anchorDown");
//				anchorDown.HRef = "javascript:ToggleDiv('" +  divExpCollAsst.ClientID + "')";
			}
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:63,代码来源:_List.ascx.cs

示例13: imgCancel_Click

 protected void imgCancel_Click(object sender, System.Web.UI.ImageClickEventArgs e)
 {
     Common Common = new Common();
     Response.Redirect(Constants.ROOT_DIRECTORY + "/SalesAndReceivables/_CreditMemo/Default.aspx?task=" + Common.Encrypt("list", Session.SessionID));
 }
开发者ID:marioricci,项目名称:erp-luma,代码行数:5,代码来源:_Post.ascx.cs

示例14: CancelPOReturn

		private void CancelPOReturn()
		{
			long DebitMemoID = Convert.ToInt64(lblDebitMemoID.Text);
			string Remarks = txtRemarks.Text;

            POReturns clsPOReturns = new POReturns();
            clsPOReturns.Cancel(DebitMemoID, DateTime.Now, Remarks, Convert.ToInt64(Session["UID"].ToString()));
            clsPOReturns.CommitAndDispose();

			Common Common = new Common();
			Response.Redirect("Default.aspx?task=" + Common.Encrypt("list",Session.SessionID));		
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:12,代码来源:_Cancel.ascx.cs

示例15: LoadRecord

		private void LoadRecord()
		{
			Common Common = new Common();
			Int64 iID = Convert.ToInt64(Common.Decrypt(Request.QueryString["memoid"],Session.SessionID));
			DebitMemos clsDebitMemos = new DebitMemos();
			DebitMemoDetails clsDetails = clsDebitMemos.Details(iID);
			clsDebitMemos.CommitAndDispose();

			lblDebitMemoID.Text = clsDetails.DebitMemoID.ToString();
			lnkMemoNo.Text = clsDetails.MemoNo;
            lnkMemoNo.NavigateUrl = "Default.aspx?task=" + Common.Encrypt("details", Session.SessionID) + "&memoid=" + Common.Encrypt(clsDetails.DebitMemoID.ToString(), Session.SessionID);
			lblMemoDate.Text = clsDetails.MemoDate.ToString("yyyy-MM-dd HH:mm:ss");
			txtRequiredPostingDate.Text = clsDetails.RequiredPostingDate.ToString("yyyy-MM-dd");
			cboSupplier.SelectedIndex = cboSupplier.Items.IndexOf(cboSupplier.Items.FindByValue(clsDetails.SupplierID.ToString()));
			txtSupplierContact.Text = clsDetails.SupplierContact;
			txtSupplierTelephoneNo.Text = clsDetails.SupplierTelephoneNo;
			lblTerms.Text = clsDetails.SupplierTerms.ToString("##0");
            lblModeOfterms.Text = clsDetails.SupplierModeOfTerms.ToString("G");
			txtSupplierAddress.Text = clsDetails.SupplierAddress;
			cboBranch.SelectedIndex = cboBranch.Items.IndexOf(cboBranch.Items.FindByValue(clsDetails.BranchID.ToString()));
			txtBranchAddress.Text = clsDetails.BranchAddress;
			txtRemarks.Text = clsDetails.Remarks;
		}
开发者ID:marioricci,项目名称:erp-luma,代码行数:23,代码来源:_Update.ascx.cs


注:本文中的Common.Encrypt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。