コード例 #1
0
ファイル: _Update.ascx.cs プロジェクト: marioricci/erp-luma
		private void LoadOptions()
		{
			AccountCategories clsAccountCategory = new AccountCategories();
			DataClass clsDataClass = new DataClass();
			
			cboAccountCategory.DataTextField = "AccountCategoryName";
            cboAccountCategory.DataValueField = "AccountCategoryID";
			cboAccountCategory.DataSource = clsDataClass.DataReaderToDataTable(clsAccountCategory.List("AccountCategoryName",SortOption.Ascending)).DefaultView;
			cboAccountCategory.DataBind();
			cboAccountCategory.SelectedIndex = cboAccountCategory.Items.Count - 1;
			clsAccountCategory.CommitAndDispose();	
		}
コード例 #2
0
ファイル: _Update.ascx.cs プロジェクト: marioricci/erp-luma
		private void LoadRecord()
		{
			Int32 iID = Convert.ToInt32(Common.Decrypt(Request.QueryString["id"],Session.SessionID));
			AccountCategories clsAccountCategory = new AccountCategories();
			AccountCategoryDetails clsDetails = clsAccountCategory.Details(iID);
			clsAccountCategory.CommitAndDispose();

			lblAccountCategoryID.Text = clsDetails.AccountCategoryID.ToString();
			cboAccountSummary.SelectedIndex = cboAccountSummary.Items.IndexOf( cboAccountSummary.Items.FindByValue(clsDetails.AccountSummaryDetails.AccountSummaryID.ToString()));
			txtAccountCategoryCode.Text = clsDetails.AccountCategoryCode;
			txtAccountCategoryName.Text = clsDetails.AccountCategoryName;
		}
コード例 #3
0
ファイル: _List.ascx.cs プロジェクト: marioricci/erp-luma
 private void LoadAccountCategoryList(DataList lstAccountCategory, int AccountSummaryID)
 {
     AccountCategories clsAccountCategory = new AccountCategories();
     DataClass clsDataClass = new DataClass();
     System.Data.DataTable dt = clsDataClass.DataReaderToDataTable(clsAccountCategory.List(AccountSummaryID, "AccountCategoryCode", SortOption.Ascending));
     clsAccountCategory.CommitAndDispose();
     lstAccountCategory.DataSource = dt.DefaultView;
     lstAccountCategory.DataBind();
 }
コード例 #4
0
ファイル: _List.ascx.cs プロジェクト: marioricci/erp-luma
		private bool Delete()
		{
			bool boRetValue = false;
			string stIDs = "";

			foreach(DataListItem item in lstAccountSummary.Items)
			{
                DataList lstAccountCategory = (DataList)item.FindControl("lstAccountCategory");
                foreach (DataListItem itemAccountCategory in lstAccountCategory.Items)
                {
                    HtmlInputCheckBox chkList = (HtmlInputCheckBox)itemAccountCategory.FindControl("chkList");
                    if (chkList != null)
                    {
                        if (chkList.Checked == true)
                        {
                            stIDs += chkList.Value + ",";
                            boRetValue = true;
                        }
                    }
                }
			}
			if (boRetValue)
			{
				AccountCategories clsAccountCategory = new AccountCategories();
				clsAccountCategory.Delete( stIDs.Substring(0,stIDs.Length-1));
				clsAccountCategory.CommitAndDispose();
			}

			return boRetValue;
		}
コード例 #5
0
ファイル: _Update.ascx.cs プロジェクト: marioricci/erp-luma
		private void SaveRecord()
		{
			AccountCategoryDetails clsDetails = new AccountCategoryDetails();

			clsDetails.AccountCategoryID = Convert.ToInt16(lblAccountCategoryID.Text);
            clsDetails.AccountSummaryDetails = new AccountSummaryDetails
            {
                AccountSummaryID = Convert.ToInt32(cboAccountSummary.SelectedItem.Value)
            };
			clsDetails.AccountCategoryCode = txtAccountCategoryCode.Text;
			clsDetails.AccountCategoryName = txtAccountCategoryName.Text;
			
			AccountCategories clsAccountCategory = new AccountCategories();
			clsAccountCategory.Update(clsDetails);
			clsAccountCategory.CommitAndDispose();
		}
コード例 #6
0
ファイル: _Insert.ascx.cs プロジェクト: marioricci/erp-luma
		private Int32 SaveRecord()
		{
			AccountCategoryDetails clsDetails = new AccountCategoryDetails();

            clsDetails.AccountSummaryDetails = new AccountSummaryDetails
            {
                AccountSummaryID = Convert.ToInt32(cboAccountSummary.SelectedItem.Value)
            };
			clsDetails.AccountCategoryCode = txtAccountCategoryCode.Text;
			clsDetails.AccountCategoryName = txtAccountCategoryName.Text;
			
			AccountCategories clsAccountCategory = new AccountCategories();
			Int32 id = clsAccountCategory.Insert(clsDetails);
			clsAccountCategory.CommitAndDispose();

			return id;
		}