コード例 #1
0
 private void BindProgramDropdown()
 {
     try
     {
         IQCareUtils theUtils = new IQCareUtils();
         ddlProgramName.Items.Clear();
         IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         DataSet     dsProgramlist  = objProgramlist.GetProgramList();
         DataView    theDV          = new DataView(dsProgramlist.Tables[0]);
         theDV.RowFilter = "Status = 0";
         DataTable     theDT   = theUtils.CreateTableFromDataView(theDV);
         BindFunctions theBind = new BindFunctions();
         theBind.Win_BindCombo(ddlProgramName, theDT, "ProgramName", "Id");
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (ValidateForm() == false)
                {
                    return;
                }

                Hashtable   theHash        = BuildHashTable();
                IMasterList theItemManager = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList, BusinessProcess.SCM");
                theItemManager.SaveUpdateItemMaster(theHash);
                IQCareWindowMsgBox.ShowWindowConfirm("ItemMasterUpdate", this);
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #3
0
        private void BindItemTypeDropdown()
        {
            try
            {
                IQCareUtils theUtils = new IQCareUtils();
                ddlItemType.Items.Clear();
                IMasterList objProgramlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                DataTable   theDT          = objProgramlist.GetItemType();
                DataView    theDV          = new DataView(theDT);
                theDV.RowFilter = "DeleteFlag = 0";

                BindFunctions theBind = new BindFunctions();
                theBind.Win_BindCombo(ddlItemType, theDV.ToTable(), "ItemType", "ID");
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #4
0
 /*private void BindItemsubTypeDropdown(string ItemTypeId)
  * {
  *  try
  *  {
  *      IQCareUtils theUtils = new IQCareUtils();
  *      ddlItemType.DataSource = null;
  *      IMasterList objSubitemType = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
  *      DataTable theDT = objSubitemType.GetSubItemType();
  *      BindFunctions theBind = new BindFunctions();
  *      DataView theDV = new DataView(theDT);
  *      theDV.RowFilter = "ItemTypeId =" + ItemTypeId;
  *      theBind.Win_BindCombo(ddlItemType, theDV.ToTable(), "DrugTypeName", "drugTypeID");
  *  }
  *  catch (Exception err)
  *  {
  *      MsgBuilder theBuilder = new MsgBuilder();
  *      theBuilder.DataElements["MessageText"] = err.Message.ToString();
  *      IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
  *  }
  * }
  */
 private void BindItemList(int subitemId)
 {
     try
     {
         chkItemList.DataSource = null;
         IMasterList   objItemlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
         DataSet       theDS       = objItemlist.GetItemList(subitemId);
         BindFunctions theBind     = new BindFunctions();
         theBind.Win_BindCheckListBox(chkItemList, theDS.Tables[0], "ItemName", "ItemID");
         if (chkItemList.Items.Count == 0)
         {
             chkAll.Checked = false;
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #5
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                DTItemlist = (DataTable)dgwBudgetConfig.DataSource;
                DataSet SaveBudgetDataSet = new DataSet();
                SaveBudgetDataSet.Tables.Add(dsBudgetConfigList.Tables[0].Copy());
                SaveBudgetDataSet.Tables.Add(DTItemlist.Copy());

                IBudgetConfigDetail objItemlist = (IBudgetConfigDetail)ObjectFactory.CreateInstance("BusinessProcess.SCM.BBudgetConfigDetail,BusinessProcess.SCM");
                int retrows = objItemlist.SaveBudgetConfigDetails(DTItemlist, dsBudgetConfigList.Tables[0], GblIQCare.AppUserId, GblIQCare.objHashtbl);
                IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                //Init_Form();
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #6
0
        private void BindCombo()
        {
            try
            {
                DataSet XMLDS = new DataSet();
                XMLDS.ReadXml(GblIQCare.GetXMLPath() + "\\AllMasters.con");
                BindFunctions theBindManager = new BindFunctions();

                DataView theDV = new DataView(XMLDS.Tables["Mst_Store"]);
                theDV.RowFilter = "(DeleteFlag =0 or DeleteFlag is null)";
                theDV.Sort      = "Name ASC";
                DataTable theStoreDT = theDV.ToTable();
                theBindManager.Win_BindCombo(ddlStore, theStoreDT, "Name", "Id");
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #7
0
 private void lstSearch_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         Int32 theItemId = Convert.ToInt32(lstSearch.SelectedValue);
         txtItemName.Text = lstSearch.Text;
         DataView theDV = new DataView(theDTItems);
         //theDV.RowFilter = "Drug_Pk=" + theItemId.ToString();
         theDV.RowFilter = "ItemId=" + theItemId.ToString();
         if (theDV.ToTable().Rows.Count > 0)
         {
             lstSearch.Visible = false;
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #8
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            try
            {
                if (dgwStockSummary.RowCount > 0)
                {
                    SaveFileDialog sfd = new SaveFileDialog();
                    sfd.Filter   = "Excel Documents (*.xls)|*.xls";
                    sfd.FileName = string.Format("StockList{0}.xls", DateTime.Now.ToString("yyyyMMddHHmmss"));
                    if (sfd.ShowDialog() == DialogResult.OK)
                    {
                        //ToCsV(dataGridView1, @"c:\export.xls");
                        ExportToExcel(dgwStockSummary, sfd.FileName); // Here dataGridview1 is your grid view name
                    }


                    //if (dgwStockSummary.RowCount > 0)
                    //{
                    //    IQCareUtils theUtil = new IQCareUtils();
                    //    DataTable theDT = (DataTable)dgwStockSummary.DataSource;
                    //    theDT.Columns.Remove("StoreId");
                    //    //theDT.Columns.Remove("StoreName");
                    //    theDT.Columns.Remove("ItemId");
                    //    string theFilePath = System.Configuration.ConfigurationManager.AppSettings["ExcelFilesPath"];
                    //    theFilePath = theFilePath + "StockSummary.xls";
                    //    theUtil.ExportToExcel_Windows(theDT, theFilePath, "");
                }
                else
                {
                    IQCareWindowMsgBox.ShowWindow("GridData", this);
                    return;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #9
0
        private void dgwFormDetails_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {

                if (e.ColumnIndex != -1 && e.RowIndex != -1)
                {
                    if (Convert.ToString(dgwFormDetails.Rows[e.RowIndex].Cells[4].Value) == "Published")
                    {
                        IQCareWindowMsgBox.ShowWindow("PublishTechenicalArea", this);
                        return;
                    }

                    DataTable tbl1 = (DataTable)dgwFormDetails.DataSource;
                    if (tbl1.Rows.Count > 0)
                    {
                        if (e.RowIndex > tbl1.Rows.Count)
                        {
                            return;
                        }

                        GblIQCare.iHomePageId = Convert.ToInt32(dgwFormDetails.Rows[e.RowIndex].Cells[5].Value.ToString());
                        Form theForm = (Form)Activator.CreateInstance(Type.GetType("IQCare.FormBuilder.frmHomePage, IQCare.FormBuilder"));
                        theForm.MdiParent = this.MdiParent;
                        theForm.Left = 0;
                        theForm.Top = 2;
                        this.Close();
                        theForm.Show();
                    }
                }
            }
            catch (Exception err)
            {

                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }

        }
コード例 #10
0
        /// <summary>
        /// Handles the Click event of the btnSubmit control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (Convert.ToInt32(ddlStore.SelectedValue) == 0)
            {
                IQCareWindowMsgBox.ShowWindow("StoreName", this);
                ddlStore.Focus();
                return;
            }
            TimeSpan ts   = Convert.ToDateTime(dtpTo.Text) - Convert.ToDateTime(dtpFrom.Text);
            Int32    days = ts.Days;

            if (days < 0)
            {
                IQCareWindowMsgBox.ShowWindow("FromToDate", this);
                return;
            }
            try
            {
                Int32 itemId = 0;
                if (txtItemName.Text.Trim() != "")
                {
                    itemId = Convert.ToInt32(lstSearch.SelectedValue);
                }
                DataSet theDS = GetItems(Convert.ToInt32(ddlStore.SelectedValue), itemId, Convert.ToDateTime(dtpFrom.Text), Convert.ToDateTime(dtpTo.Text));
                if (itemId == 0)
                {
                    ShowGrid(theDS.Tables[1]);
                }
                else
                {
                    ShowGrid(theDS.Tables[2]);
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #11
0
        private void dgwHolisticBudgetView_GotFocus(object sender, EventArgs e)
        {
            try
            {
                ///////////DTItemlist = (DataTable)dgwHolisticBudgetView.DataSource;

                //////////if (DTItemlist.Rows.Count > 0)
                //////////{
                //////////    for (int j = 5; j < dgwHolisticBudgetView.Columns.Count; ++j)
                //////////    {
                //////////        double total = 0;

                //////////        for (int i = 0; i < dgwHolisticBudgetView.Rows.Count - 1; ++i)
                //////////        {
                //////////            total += Convert.ToDouble(dgwHolisticBudgetView.Rows[i].Cells[j].Value);
                //////////        }
                //////////        dgwHolisticBudgetView.Rows[12].Cells[j].Value = total.ToString("F");
                //////////    }

                //////////}

                foreach (DataGridViewTextBoxColumn dgc in dgwHolisticBudgetView.Columns)
                {
                    if (dgc.HeaderText.Split('%').Count() > 1)
                    {
                        for (int f = 0; f < dgwHolisticBudgetView.Rows.Count; ++f)
                        {
                            dgwHolisticBudgetView.Rows[f].Cells[dgc.Index].Value = (((Convert.ToDouble(dgwHolisticBudgetView.Rows[f].Cells[dgc.Index - 1].Value)) / (Convert.ToDouble(dgwHolisticBudgetView.Rows[f].Cells[5].Value))) * 100).ToString("F").Replace("NaN", "0.00");
                        }
                    }
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #12
0
 private void btnDown_Click(object sender, EventArgs e)
 {
     try
     {
         if (dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Index < dgwProgramList.Rows.Count - 1)
         {
             //string Id = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[0].Value.ToString();
             string StrProId    = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[1].Value.ToString();
             string StrName     = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[2].Value.ToString();
             string StrStatusID = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[3].Value.ToString();
             string StrStatus   = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[4].Value.ToString();
             string StrMonthID  = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[5].Value.ToString();
             string StrMonth    = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[6].Value.ToString();
             //dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[0].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[0].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[1].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[1].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[2].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[2].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[3].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[3].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[4].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[4].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[5].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[5].Value;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex + 1].Cells[6].Value = dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[6].Value;
             //dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[0].Value = Id;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[1].Value = StrProId;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[2].Value = StrName;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[3].Value = StrStatusID;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[4].Value = StrStatus;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[5].Value = StrMonthID;
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Cells[6].Value = StrMonth;
             this.dgwProgramList.CurrentCell = this.dgwProgramList[2, dgwProgramList.CurrentCell.RowIndex + 1];
             dgwProgramList.Rows[dgwProgramList.CurrentCell.RowIndex].Selected = true;
             theDT = (DataTable)dgwProgramList.DataSource;
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #13
0
        private void btnUp_Click(object sender, EventArgs e)
        {
            try
            {
                if (dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Index >= 1)
                {
                    DTItemlist = (DataTable)dgwStoreName.DataSource;
                    string Id                 = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[0].Value.ToString();
                    string StoreId            = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[1].Value.ToString();
                    string StrName            = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[2].Value.ToString();
                    string StrCentralStore    = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[3].Value.ToString();
                    string StrDispensingStore = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[4].Value.ToString();
                    string StrStatus          = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[5].Value.ToString();

                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[0].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[0].Value;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[1].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[1].Value;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[2].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[2].Value;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[3].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[3].Value;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[4].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[4].Value;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex - 1].Cells[5].Value = dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[5].Value;

                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[0].Value = Id;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[1].Value = StoreId;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[2].Value = StrName;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[3].Value = StrCentralStore;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[4].Value = StrDispensingStore;
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Cells[5].Value = StrStatus;
                    this.dgwStoreName.CurrentCell = this.dgwStoreName[2, dgwStoreName.CurrentCell.RowIndex - 1];
                    dgwStoreName.Rows[dgwStoreName.CurrentCell.RowIndex].Selected = true;
                    DTItemlist = (DataTable)dgwStoreName.DataSource;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #14
0
 public void BindData()
 {
     try
     {
         IFormModuleLink objFormModuleLink = (IFormModuleLink)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BFormModuleLink, BusinessProcess.FormBuilder");
         objDsFormModuleLinkDetails = objFormModuleLink.FormModuleLinking(0, Convert.ToInt32(GblIQCare.AppCountryId));
         if (objDsFormModuleLinkDetails.Tables[1].Rows.Count > 0)
         {
             BindFunctions theBind = new BindFunctions();
             theBind.Win_BindCombo(cmbModuleName, objDsFormModuleLinkDetails.Tables[0], "ModuleName", "ModuleID");
             theBind.Win_BindCheckListBox(chklistFormName, objDsFormModuleLinkDetails.Tables[1], "FeatureName", "FeatureID");
             chklistFormName.SelectedValueChanged += new EventHandler(chklistFormName_SelectedValueChanged);
             chklistFormName.DoubleClick          += new EventHandler(chklistFormName_DoubleClick);
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #15
0
        // private void btnAdd_Click(object sender, EventArgs e)
        //{
        //    GblIQCare.iHomePageId = 0;
        //    Form theForm = (Form)Activator.CreateInstance(Type.GetType("IQCare.FormBuilder.frm, IQCare.FormBuilder"));
        //    theForm.MdiParent = this.MdiParent;
        //    theForm.Left = 0;
        //    theForm.Top = 2;
        //    this.Close();
        //    theForm.Show();
        //}

        private void BindGrid()
        {
            DataSet dsQueryCareEndDetails = new DataSet();

            try
            {
                int intPublished = -1;

                if (cmbFormStatus.Text == "All")
                {
                    intPublished = -1;
                }
                else if (cmbFormStatus.Text == "Published")
                {
                    intPublished = 2;
                }
                else if (cmbFormStatus.Text == "UnPublished")
                {
                    intPublished = 1;
                }

                if (cmbTechnicalArea.SelectedValue != null && Convert.ToInt32(cmbTechnicalArea.SelectedValue) > -1)
                {
                    objCareEnd            = (ICareEndedConfiguration)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BCareEndedConfiguration,BusinessProcess.FormBuilder");
                    dsQueryCareEndDetails = objCareEnd.GetCareEndQuery(Convert.ToInt32(cmbTechnicalArea.SelectedValue), intPublished);

                    dgwFormDetails.DataSource = null;
                    string strGetPath = GblIQCare.GetPath();
                    ShowGrid(dsQueryCareEndDetails.Tables[0]);
                }
            }

            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #16
0
        private void SelectedComboVal()
        {
            try
            {
                //if (ddlCostCategory.SelectedIndex == 0) { return; }
                if (ddlCalendarYear.SelectedIndex == 0)
                {
                    return;
                }

                BindFunctions objBindControls = new BindFunctions();
                int           costCategoryVal = 0;
                int           calendarYearVal = 0;

                if (ddlCostCategory.SelectedValue != null)
                {
                    if (ddlCostCategory.SelectedIndex >= 0)
                    {
                        costCategoryVal = Convert.ToInt32(ddlCostCategory.SelectedValue);
                    }
                }
                if (ddlCalendarYear.SelectedValue != null)
                {
                    if (ddlCalendarYear.SelectedIndex != 0)
                    {
                        calendarYearVal = Convert.ToInt32(ddlCalendarYear.SelectedValue);
                    }
                }
                LoadGrid(LoadGridData(costCategoryVal, calendarYearVal).Tables[0]);
                dgwHolisticBudgetView.Focus();
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #17
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable dtStoreUserList = new DataTable();
                dtStoreUserList = dsStoreList.Tables[3];

                //arrItemList = new ArrayList();
                for (int i = 0; i < chkItemList.Items.Count; i++)
                {
                    if (chkItemList.GetItemChecked(i) == true)
                    {
                        DataRow theDR = dtStoreUserList.NewRow();
                        theDR["StoreID"] = ddlStore.SelectedValue;
                        theDR["UserID"]  = Convert.ToInt32((((System.Data.DataRowView)(chkItemList.Items[i])).Row.ItemArray[0]).ToString());

                        // arrItemList.Add((((System.Data.DataRowView)(chkItemList.Items[i])).Row.ItemArray[0]).ToString());
                        dtStoreUserList.Rows.Add(theDR);
                    }
                }

                //string ItemType = ddlItemType.SelectedValue.ToString();
                IMasterList objMasterlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                int         ret           = objMasterlist.SaveUpdateStoreUserLinking(dtStoreUserList);
                BindStoreDropdown();
                if (ret > 0)
                {
                    IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                    return;
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #18
0
 public Boolean BindGrid()
 {
     try
     {
         objViewAssociation   = (IViewAssociation)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BViewAssociation,BusinessProcess.FormBuilder");
         objDsViewAssociation = objViewAssociation.GetViewAssociationFields(FieldName, ModuleId);
         if (objDsViewAssociation.Tables[0].Rows.Count > 0)
         {
             ShowGrid(objDsViewAssociation.Tables[0]);
         }
         else
         {
             return(false);
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
     return(true);
 }
コード例 #19
0
 private void txtset2value1_Validating(object sender, CancelEventArgs e)
 {
     try
     {
         if (txtset2value1.Text == "")
         {
             IQCareWindowMsgBox.ShowWindow("EnterValue", this);
             return;
         }
         float iNumberEntered = float.Parse(txtset2value1.Text);
         if (iNumberEntered < 1.0)
         {
             e.Cancel = true;
             IQCareWindowMsgBox.ShowWindow("PMTCTNotValid", this);
             return;
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #20
0
 /// <summary>
 /// Handles the SelectionChangeCommitted event of the ddlStore control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
 private void ddlStore_SelectionChangeCommitted(object sender, EventArgs e)
 {
     try
     {
         if (Convert.ToInt32(ddlStore.SelectedValue) != 0)
         {
             BindFunctions theBindManager = new BindFunctions();
             DataSet       theDS          = GetItems(Convert.ToInt32(ddlStore.SelectedValue), 0, Convert.ToDateTime(dtpFrom.Text), Convert.ToDateTime(dtpTo.Text));
             theDrugListing = theDS.Tables[0];
         }
         else
         {
             txtItemName.Text = "";
             dgwBatchSummary.Columns.Clear();
             dgwBatchSummary.DataSource = null;
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #21
0
 /// <summary>
 /// This function is used to bind grid with database
 /// </summary>
 /// <param name="FieldName"></param>
 public void BindGrid()
 {
     try
     {
         IManageForms objFormDetail;
         objFormDetail    = (IManageForms)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BManageForms,BusinessProcess.FormBuilder");
         objDsFormDetails = objFormDetail.GetFormDetail(cmbFormStatus.SelectedIndex.ToString(), (cmbTechArea.SelectedValue == null || cmbTechArea.SelectedIndex == 0) ? "0" : cmbTechArea.SelectedValue.ToString(), Convert.ToInt16(GblIQCare.AppCountryId));
         if (objDsFormDetails.Tables[0].Rows.Count > 0)
         {
             ClearGrid();
             string strGetPath = GblIQCare.GetPath();
             imgPublished   = Image.FromFile(strGetPath + "\\Published1.bmp");
             imgUnpublished = Image.FromFile(strGetPath + "\\Unpublished11.bmp");
             imgInprocess   = Image.FromFile(strGetPath + "\\Inprocess11.bmp");
             ShowGrid(objDsFormDetails.Tables[0]);
         }
     }
     catch (Exception err)
     {
         MsgBuilder theBuilder = new MsgBuilder();
         theBuilder.DataElements["MessageText"] = err.Message.ToString();
         IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
     }
 }
コード例 #22
0
        /// <summary>
        /// This function is used to bind grid with database
        /// </summary>
        /// <param name="FieldName"></param>
        public void BindList()
        {
            try
            {
                IManageForms objFormDetail;
                objFormDetail    = (IManageForms)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BManageForms,BusinessProcess.FormBuilder");
                objDsFormDetails = objFormDetail.GetFormDetail("1", (cmbTechArea.SelectedValue == null || cmbTechArea.SelectedIndex == 0) ? "0" : cmbTechArea.SelectedValue.ToString(), Convert.ToInt16(GblIQCare.AppCountryId));

                DataView dvForm = objDsFormDetails.Tables[0].DefaultView;
                dvForm.Sort = "seq asc";
                dtForms     = dvForm.ToTable();
                lstForms.Items.Clear();
                for (int i = 0; i < dtForms.Rows.Count; i++)
                {
                    lstForms.Items.Add(dtForms.Rows[i]["FormName"]);
                }
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #23
0
        private void LoadGrid(DataTable theDT)
        {
            try
            {
                dgwBudgetConfig.DataSource = null;
                dgwBudgetConfig.Columns.Clear();
                dgwBudgetConfig.AutoGenerateColumns = true;
                dgwBudgetConfig.DataSource          = theDT;
                dgwBudgetConfig.Columns[0].Visible  = false;

                foreach (DataGridViewTextBoxColumn dgc in dgwBudgetConfig.Columns)
                {
                    dgc.HeaderText = CultureInfo.CurrentUICulture.TextInfo.ToTitleCase(dgc.HeaderText.ToLower());
                    dgc.ReadOnly   = true;
                    if (dgc.HeaderText.ToUpper() == "PROGRAMSTARTMONTH")
                    {
                        dgc.HeaderText = "Program Start Month";
                    }
                    else if (dgc.HeaderText.ToUpper() == "PROGRAMYEARTOTAL")
                    {
                        dgc.HeaderText = "Program Year Total";
                    }
                }
                DataGridViewCheckBoxColumn col1 = new DataGridViewCheckBoxColumn();
                col1.HeaderText = "Del";
                col1.Name       = "DeleteFlag";
                col1.ReadOnly   = false;
                dgwBudgetConfig.Columns.Add(col1);
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #24
0
        private void dgwModuleDetails_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
        {
            {
                try
                {
                    Color  ClrRed      = Color.FromArgb(204, 0, 0);
                    string strPubValue = "";
                    if (e.ColumnIndex != -1 && e.RowIndex != -1)
                    {
                        if (dgwModuleDetails.Columns[e.ColumnIndex].HeaderText.Equals("Status"))
                        {
                            if (e.Value == null || e.Value.ToString() == "")
                            {
                                strPubValue = "0";
                            }
                            else
                            {
                                strPubValue = e.Value.ToString();
                            }
                        }
                        else if (dgwModuleDetails.Rows.Count >= 1)
                        {
                            if (dgwModuleDetails.Rows[e.RowIndex].Cells["Status"].Value.ToString() == "")
                            {
                                strPubValue = "0";
                            }
                            else
                            {
                                strPubValue = dgwModuleDetails.Rows[e.RowIndex].Cells["Status"].Value.ToString();
                            }
                        }
                    }


                    switch (strPubValue)
                    {
                    case "Un-Published":
                        dgwModuleDetails.Rows[e.RowIndex].Cells["ModuleName"].Style.BackColor        = System.Drawing.Color.Red;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["DisplayName"].Style.BackColor       = System.Drawing.Color.Red;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["CanEnroll"].Style.BackColor         = System.Drawing.Color.Red;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["Status"].Style.BackColor            = System.Drawing.Color.Red;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["PatientIdentifier"].Style.BackColor = System.Drawing.Color.Red;
                        break;

                    case "Published":
                        dgwModuleDetails.Rows[e.RowIndex].Cells["ModuleName"].Style.BackColor        = System.Drawing.Color.Green;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["DisplayName"].Style.BackColor       = System.Drawing.Color.Green;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["CanEnroll"].Style.BackColor         = System.Drawing.Color.Green;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["Status"].Style.BackColor            = System.Drawing.Color.Green;
                        dgwModuleDetails.Rows[e.RowIndex].Cells["PatientIdentifier"].Style.BackColor = System.Drawing.Color.Green;
                        break;
                    }
                }

                catch (Exception err)
                {
                    MsgBuilder theBuilder = new MsgBuilder();
                    theBuilder.DataElements["MessageText"] = err.Message.ToString();
                    IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
                }
            }
        }
コード例 #25
0
        private void ShowGrid(DataTable theDT)
        {
            try
            {
                dgwModuleDetails.DataSource = null;
                DataGridViewTextBoxColumn colName = new DataGridViewTextBoxColumn();
                colName.HeaderText       = "Service";
                colName.DataPropertyName = "ModuleName";
                colName.Name             = "ModuleName";
                colName.Width            = 150;
                colName.ReadOnly         = true;

                dgwModuleDetails.DataSource = null;
                DataGridViewTextBoxColumn colDisplayName = new DataGridViewTextBoxColumn();
                colDisplayName.HeaderText       = "Service Display Name";
                colDisplayName.DataPropertyName = "DisplayName";
                colDisplayName.Name             = "DisplayName";
                colDisplayName.Width            = 150;
                colDisplayName.ReadOnly         = true;

                dgwModuleDetails.DataSource = null;
                DataGridViewTextBoxColumn colEnroll = new DataGridViewTextBoxColumn();
                colEnroll.HeaderText       = "Can Enroll";
                colEnroll.DataPropertyName = "CanEnroll";
                colEnroll.Name             = "CanEnroll";
                colEnroll.Width            = 85;
                colEnroll.ReadOnly         = true;

                DataGridViewTextBoxColumn colPatIdentifier = new DataGridViewTextBoxColumn();
                colPatIdentifier.HeaderText       = "Patient Identifier";
                colPatIdentifier.DataPropertyName = "PatientIdentifier";
                colPatIdentifier.Name             = "PatientIdentifier";
                colPatIdentifier.Width            = 500;
                colPatIdentifier.ReadOnly         = true;

                DataGridViewTextBoxColumn colStatus = new DataGridViewTextBoxColumn();
                colStatus.HeaderText       = "Status";
                colStatus.DataPropertyName = "Status";
                colStatus.Name             = "Status";
                colStatus.Width            = 85;
                colStatus.ReadOnly         = true;

                DataGridViewTextBoxColumn colModuleId = new DataGridViewTextBoxColumn();
                colModuleId.HeaderText       = "ModuleId";
                colModuleId.DataPropertyName = "ModuleId";
                colModuleId.Name             = "ModuleId";
                colModuleId.Width            = 0;
                colModuleId.Visible          = false;

                DataGridViewTextBoxColumn colUpdateFlag = new DataGridViewTextBoxColumn();
                colUpdateFlag.HeaderText       = "UpdateFlag";
                colUpdateFlag.DataPropertyName = "UpdateFlag";
                colUpdateFlag.Name             = "UpdateFlag";
                colUpdateFlag.Width            = 0;
                colUpdateFlag.Visible          = false;

                DataGridViewTextBoxColumn colIdentifier = new DataGridViewTextBoxColumn();
                colIdentifier.HeaderText       = "Identifier";
                colIdentifier.DataPropertyName = "Identifier";
                colIdentifier.Name             = "Identifier";
                colIdentifier.Width            = 0;
                colIdentifier.Visible          = false;

                DataGridViewTextBoxColumn colPharmacyFlag = new DataGridViewTextBoxColumn();
                colPharmacyFlag.HeaderText       = "PharmacyFlag";
                colPharmacyFlag.DataPropertyName = "PharmacyFlag";
                colPharmacyFlag.Name             = "PharmacyFlag";
                colPharmacyFlag.Width            = 0;
                colPharmacyFlag.Visible          = false;

                dgwModuleDetails.Columns.Add(colName);
                dgwModuleDetails.Columns.Add(colDisplayName);
                dgwModuleDetails.Columns.Add(colEnroll);
                dgwModuleDetails.Columns.Add(colPatIdentifier);
                dgwModuleDetails.Columns.Add(colStatus);
                dgwModuleDetails.Columns.Add(colModuleId);     //invisible
                dgwModuleDetails.Columns.Add(colUpdateFlag);   //invisible
                dgwModuleDetails.Columns.Add(colIdentifier);   //invisible
                dgwModuleDetails.Columns.Add(colPharmacyFlag); //invisi

                dgwModuleDetails.DataSource = theDT;
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #26
0
        private void dgwModuleDetails_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            // int intUpdateflag;

            MsgBuilder theBuilder = new MsgBuilder();

            if (e.RowIndex != -1)
            {
                intModuleId          = Convert.ToInt32(dgwModuleDetails.Rows[e.RowIndex].Cells["ModuleId"].Value);
                GblIQCare.UpdateFlag = Convert.ToInt32(dgwModuleDetails.Rows[e.RowIndex].Cells["UpdateFlag"].Value);
                Status = Convert.ToString(dgwModuleDetails.Rows[e.RowIndex].Cells["Status"].Value);
            }

            if (e.ColumnIndex == -1)
            {
                return;
            }
            if (GblIQCare.UpdateFlag == 1)
            {
                return;
            }


            if (dgwModuleDetails.Columns[e.ColumnIndex].HeaderText == "Status")
            {
                if ((Status == "Published") || (Status == "Un-Published"))
                {
                    IModule      objIdentifier;
                    DialogResult strResult;

                    if (Status == "Published")
                    {
                        theBuilder.DataElements["PgStatus"] = "UnPublish";
                    }
                    else
                    {
                        theBuilder.DataElements["PgStatus"] = "Publish";
                    }
                    strResult = IQCareWindowMsgBox.ShowWindowConfirm("Publish", theBuilder, this);

                    if (strResult == DialogResult.No)
                    {
                        return;
                    }

                    if (strResult.ToString() == "Yes")
                    {
                        if (Status == "Published")
                        {
                            Hashtable theHT = new Hashtable();
                            theHT.Add("ModuleID", intModuleId);
                            theHT.Add("Status", 1);
                            theHT.Add("DeleteFlag", 0);
                            theHT.Add("UserID", GblIQCare.AppUserId);
                            DataTable theDT = new DataTable();
                            objIdentifier = (IModule)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BModule, BusinessProcess.FormBuilder");
                            Int32 intExistModuleId = objIdentifier.StatusUpdate(theHT);
                            BindGrid();
                        }
                        if (Status == "Un-Published")
                        {
                            Hashtable theHT = new Hashtable();
                            theHT.Add("ModuleID", intModuleId);
                            theHT.Add("Status", 2);
                            theHT.Add("DeleteFlag", 0);
                            theHT.Add("UserID", GblIQCare.AppUserId);
                            DataTable theDT = new DataTable();
                            objIdentifier = (IModule)ObjectFactory.CreateInstance("BusinessProcess.FormBuilder.BModule, BusinessProcess.FormBuilder");
                            Int32 intExistModuleId = objIdentifier.StatusUpdate(theHT);
                            BindGrid();
                        }
                    }
                }
            }
        }
コード例 #27
0
ファイル: frmSupplierItem.cs プロジェクト: wamathaga/IQCare
        private void btnSave_Click(object sender, EventArgs e)
        {
            // if (GblIQCare.ItemFeatureId == 144)
            // {
            if (ddlSupplierName.SelectedValue.ToString() == "0")
            {
                //IQCareWindowMsgBox.ShowWindow("SupplierName", this);
                MsgBuilder theBuilder = new MsgBuilder();
                if (GblIQCare.ItemFeatureId == 144)
                {
                    theBuilder.DataElements["Control"] = "Supplier Name";
                }
                else if (GblIQCare.ItemFeatureId == 149)
                {
                    theBuilder.DataElements["Control"] = "Store Name";
                }
                IQCareWindowMsgBox.ShowWindow("BlankDropDown", theBuilder, this);
                ddlSupplierName.Focus();
                return;
            }
            if (ddlItemType.SelectedValue.ToString() == "0")
            {
                //IQCareWindowMsgBox.ShowWindow("ItemTypeSelect", this);
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Item type";
                IQCareWindowMsgBox.ShowWindow("BlankDropDown", theBuilder, this);
                ddlItemType.Focus();
                return;
            }
            // }
            try
            {
                DtItem      = CreateItemTable();
                arrItemList = new ArrayList();
                for (int i = 0; i < chkItemList.Items.Count; i++)
                {
                    if (chkItemList.GetItemChecked(i) == true)
                    {
                        DataRow theDR = DtItem.NewRow();
                        theDR["ItemID"] = Convert.ToInt32((((System.Data.DataRowView)(chkItemList.Items[i])).Row.ItemArray[0]).ToString());
                        DataView theDV = new DataView(theItemList);
                        theDV.RowFilter = "ItemID =" + theDR["ItemID"].ToString();
                        // arrItemList.Add((((System.Data.DataRowView)(chkItemList.Items[i])).Row.ItemArray[0]).ToString());
                        DtItem.Rows.Add(theDR);
                    }
                }

                IMasterList objMasterlist = (IMasterList)ObjectFactory.CreateInstance("BusinessProcess.SCM.BMasterList,BusinessProcess.SCM");
                int         ret           = 0;
                if (GblIQCare.ItemFeatureId == 144)
                {
                    ret = objMasterlist.SaveSupplierItemList(DtItem, Convert.ToInt32(ddlItemType.SelectedValue), GblIQCare.AppUserId, Convert.ToInt32(ddlSupplierName.SelectedValue));

                    ddlSupplierName.SelectedValue = 0;
                    ddlItemType.SelectedValue     = 0;
                    ddlItemSubType.SelectedValue  = 0;
                }
                else if (GblIQCare.ItemFeatureId == 149)
                {
                    // ret = objMasterlist.SaveStoreItemList(DtItem, GblIQCare.AppUserId, Convert.ToInt32(ddlSupplierName.SelectedValue));
                    ret = objMasterlist.SaveStoreItemList_Filtered(DtItem, GblIQCare.AppUserId, Convert.ToInt32(ddlSupplierName.SelectedValue), Convert.ToInt32(ddlItemType.SelectedValue));
                    ddlSupplierName.SelectedValue = 0;

                    ddlItemType.SelectedValue    = 0;
                    ddlItemSubType.SelectedValue = 0;
                }



                // BindItemListStore(0);

                if (ret > 0)
                {
                    IQCareWindowMsgBox.ShowWindow("ProgramSave", this);
                    chkItemList.DataSource = null;
                    chkItemList.Items.Clear();
                    return;
                }
            }



            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #28
0
        private bool ValidateForm()
        {
            DataView theDV = new DataView(theDTAllItems);

            if (ItemCode != txtItemCode.Text)
            {
                theDV.RowFilter = "DrugId = '" + txtItemCode.Text + "'";
                if (theDV.ToTable().Rows.Count > 0)
                {
                    IQCareWindowMsgBox.ShowWindow("CheckDuplicateValue", this);
                    return(false);
                }
            }

            if (Convert.ToInt32(cmbDispensingUnit.SelectedValue) < 1)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Dispensing Unit";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankDropDown", theBuilder, this);
                return(false);
            }
            if (Convert.ToInt32(cmbPurchaseUnit.SelectedValue) < 1)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Purchase Unit";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankDropDown", theBuilder, this);
                return(false);
            }
            if (txtUnitQty.Text == "")
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Purchase Unit Quantity";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankTextBox", theBuilder, this);
                return(false);
            }
            if (txtPurchaseUnitPrice.Text == "")
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Purchase Unit Price";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankTextBox", theBuilder, this);
                return(false);
            }
            if (Convert.ToInt32(cmbManufacturer.SelectedValue) < 1)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Manufacturer";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankDropDown", theBuilder, this);
                return(false);
            }
            if (txtDispenseUnitPrice.Text == "")
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Dispensing Unit Price";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankTextBox", theBuilder, this);
                return(false);
            }
            if (txtdespensingMargin.Text == "")
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["Control"] = "Dispensing Margin";
                IQCareWindowMsgBox.ShowWindowConfirm("BlankTextBox", theBuilder, this);
                return(false);
            }

            /*  if (txteditsellingprice.Text == "")
             * {
             *    MsgBuilder theBuilder = new MsgBuilder();
             *    theBuilder.DataElements["Control"] = "Selling price";
             *    IQCareWindowMsgBox.ShowWindowConfirm("BlankTextBox", theBuilder, this);
             *    return false;
             * }*/
            return(true);
        }
コード例 #29
0
        public void ShowGrid(DataTable dt)
        {
            try
            {
                dgwViewAssociation.DataSource = null;
                dgwViewAssociation.Rows.Clear();
                dgwViewAssociation.Columns.Clear();

                DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn();
                col1.HeaderText       = " Field Name";
                col1.DataPropertyName = "Field Name";
                col1.Width            = 170;
                col1.ReadOnly         = true;


                DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn();
                col2.HeaderText       = " Display Type";
                col2.DataPropertyName = "DisplayType";
                col2.Width            = 107;
                col2.ReadOnly         = true;

                DataGridViewTextBoxColumn col3 = new DataGridViewTextBoxColumn();
                col3.HeaderText       = "Predefined";
                col3.DataPropertyName = "Predefined";
                col3.Width            = 80;
                col3.ReadOnly         = true;

                DataGridViewTextBoxColumn col4 = new DataGridViewTextBoxColumn();
                col4.HeaderText       = "Section Name";
                col4.DataPropertyName = "Section Name";
                col4.Width            = 135;
                col4.ReadOnly         = true;

                DataGridViewTextBoxColumn col5 = new DataGridViewTextBoxColumn();
                col5.HeaderText       = "Form Used In";
                col5.DataPropertyName = "Form Used In";
                col5.Width            = 140;
                col5.ReadOnly         = true;

                DataGridViewTextBoxColumn col6 = new DataGridViewTextBoxColumn();
                col6.HeaderText       = "Service";
                col6.DataPropertyName = "Module Name";
                col6.Width            = 150;
                col6.ReadOnly         = true;
                DataGridViewTextBoxColumn col7 = new DataGridViewTextBoxColumn();
                col7.HeaderText       = "Published";
                col7.DataPropertyName = "Published";
                col7.Width            = 100;
                col7.ReadOnly         = true;

                dgwViewAssociation.AutoGenerateColumns        = false;
                dgwViewAssociation.AllowUserToAddRows         = false;
                dgwViewAssociation.DefaultCellStyle.ForeColor = System.Drawing.Color.Black;
                dgwViewAssociation.DefaultCellStyle.Font.Size.Equals(12);
                dgwViewAssociation.ColumnHeadersDefaultCellStyle.Font.Bold.Equals(true);

                dgwViewAssociation.Columns.Add(col1);
                dgwViewAssociation.Columns.Add(col2);
                dgwViewAssociation.Columns.Add(col3);
                dgwViewAssociation.Columns.Add(col4);
                dgwViewAssociation.Columns.Add(col5);
                dgwViewAssociation.Columns.Add(col6);
                dgwViewAssociation.Columns.Add(col7);

                dgwViewAssociation.DataSource = dt;
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }
コード例 #30
0
        private void ShowGrid(DataTable theDT)
        {
            try
            {
                dgwModuleDetails.DataSource = null;
                DataGridViewTextBoxColumn col1 = new DataGridViewTextBoxColumn();
                col1.HeaderText       = "Service";
                col1.DataPropertyName = "ModuleName";
                col1.Width            = 200;
                col1.ReadOnly         = true;

                DataGridViewTextBoxColumn col2 = new DataGridViewTextBoxColumn();
                col2.HeaderText       = "Patient Identifier";
                col2.DataPropertyName = "PatientIdentifier";
                col2.Width            = 500;
                col2.ReadOnly         = true;

                DataGridViewTextBoxColumn col3 = new DataGridViewTextBoxColumn();
                col3.HeaderText       = "Status";
                col3.DataPropertyName = "Status";
                col3.Width            = 85;
                col3.ReadOnly         = true;

                DataGridViewTextBoxColumn col4 = new DataGridViewTextBoxColumn();
                col4.HeaderText       = "ModuleId";
                col4.DataPropertyName = "ModuleId";
                col4.Width            = 0;
                col4.Visible          = false;

                DataGridViewTextBoxColumn col5 = new DataGridViewTextBoxColumn();
                col5.HeaderText       = "UpdateFlag";
                col5.DataPropertyName = "UpdateFlag";
                col5.Width            = 0;
                col5.Visible          = false;

                DataGridViewTextBoxColumn col6 = new DataGridViewTextBoxColumn();
                col6.HeaderText       = "Identifier";
                col6.DataPropertyName = "Identifier";
                col6.Width            = 0;
                col6.Visible          = false;

                DataGridViewTextBoxColumn col7 = new DataGridViewTextBoxColumn();
                col7.HeaderText       = "PharmacyFlag";
                col7.DataPropertyName = "PharmacyFlag";
                col7.Width            = 0;
                col7.Visible          = false;

                dgwModuleDetails.Columns.Add(col1);
                dgwModuleDetails.Columns.Add(col2);
                dgwModuleDetails.Columns.Add(col3);
                dgwModuleDetails.Columns.Add(col4);
                dgwModuleDetails.Columns.Add(col5);
                dgwModuleDetails.Columns.Add(col6);
                dgwModuleDetails.Columns.Add(col7);

                dgwModuleDetails.DataSource = theDT;
            }
            catch (Exception err)
            {
                MsgBuilder theBuilder = new MsgBuilder();
                theBuilder.DataElements["MessageText"] = err.Message.ToString();
                IQCareWindowMsgBox.ShowWindowConfirm("#C1", theBuilder, this);
            }
        }