private void FillPartyDetails(Int64 nPartyID)
        {
            PartyMaster clsPartyMaster = null;
            DataTable   dtPartyDetails = null;

            try
            {
                clsPartyMaster = new PartyMaster();
                dtPartyDetails = clsPartyMaster.GetPartyInformation(nPartyID);

                if (dtPartyDetails != null && dtPartyDetails.Rows.Count > 0)
                {
                    lblPartyID.Text            = Convert.ToString(dtPartyDetails.Rows[0]["nPartyID"]);
                    txtPartyCode.Text          = Convert.ToString(dtPartyDetails.Rows[0]["sPartyCode"]);
                    txtPartyAbbrivation.Text   = Convert.ToString(dtPartyDetails.Rows[0]["sPartyAbbrivation"]);
                    txtPartyName.Text          = Convert.ToString(dtPartyDetails.Rows[0]["sPartyName"]);
                    cmbPartyType.SelectedValue = Convert.ToString(dtPartyDetails.Rows[0]["nPartyType"]);
                    txtAddressLine1.Text       = Convert.ToString(dtPartyDetails.Rows[0]["sAddressLine1"]);
                    txtAddressLine2.Text       = Convert.ToString(dtPartyDetails.Rows[0]["sAddressLine2"]);
                    txtCity.Text               = Convert.ToString(dtPartyDetails.Rows[0]["sCity"]);
                    txtState.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sState"]);
                    txtCountry.Text            = Convert.ToString(dtPartyDetails.Rows[0]["sCountry"]);
                    txtPincode.Text            = Convert.ToString(dtPartyDetails.Rows[0]["sPincode"]);
                    txtEmail.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sEmail"]);
                    txtFaxNo.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sFax"]);
                    txtBillToAddressLine1.Text = Convert.ToString(dtPartyDetails.Rows[0]["sBillToAddressLine1"]);
                    txtBillToAddressLine2.Text = Convert.ToString(dtPartyDetails.Rows[0]["sBillToAddressLine2"]);
                    txtBillToPincode.Text      = Convert.ToString(dtPartyDetails.Rows[0]["sBillToPincode"]);
                    txtShipToAddressLine1.Text = Convert.ToString(dtPartyDetails.Rows[0]["sShipToAddressLine1"]);
                    txtShipToAddressLine1.Text = Convert.ToString(dtPartyDetails.Rows[0]["sShipToAddressLine2"]);
                    txtShipToPincode.Text      = Convert.ToString(dtPartyDetails.Rows[0]["sShipToPincode"]);
                    txtGSTNo.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sGSTNO"]);
                    txtPANNo.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sPANNO"]);
                    txtTANNo.Text              = Convert.ToString(dtPartyDetails.Rows[0]["sTANNO"]);
                    string[] sPhoneAll = Convert.ToString(dtPartyDetails.Rows[0]["sPhoneNo"]).Split(',');
                    if (sPhoneAll.Length > 0)
                    {
                        int nCompPanelCount = GetPanelCount(sPhoneAll.Length);
                        for (int i = 0; i < nCompPanelCount; i++)
                        {
                            ShowHidePhonePanel(sPhoneAll[i], i + 1);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString(), clsGlobal._sMessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void FillPartyMasterList()
        {
            PartyMaster clsPartyMaster = null;
            DataTable   dt             = null;

            try
            {
                clsPartyMaster = new PartyMaster();
                dt             = clsPartyMaster.GetPartylist(0);
                if (dt != null)
                {
                    gvPartyList.GridControl.DataSource = dt;
                    gvPartyList.Columns[1].Visible     = false;
                    gvPartyList.Columns[9].Visible     = false;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error Company List: " + ex.ToString(), clsGlobal.MessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void SavePartyMember()
        {
            PartyMaster clsPartyMaster = null;

            try
            {
                string sPhone1   = Convert.ToString(txtPhone1.Text.Trim());
                string sPhone2   = Convert.ToString(txtPhone4.Text.Trim());
                string sPhone3   = Convert.ToString(txtPhone5.Text.Trim());
                string sPhone4   = Convert.ToString(txtPhone3.Text.Trim());
                string sPhone5   = Convert.ToString(txtPhone2.Text.Trim());
                string sPhoneAll = string.Empty;
                if (sPhone1 != "")
                {
                    sPhoneAll += sPhone1;
                }
                if (sPhone2 != "")
                {
                    sPhoneAll += "," + sPhone2;
                }
                if (sPhone3 != "")
                {
                    sPhoneAll += "," + sPhone3;
                }
                if (sPhone4 != "")
                {
                    sPhoneAll += "," + sPhone4;
                }
                if (sPhone5 != "")
                {
                    sPhoneAll += "," + sPhone5;
                }

                clsPartyMaster                     = new PartyMaster();
                clsPartyMaster.nPartyID            = Convert.ToInt64(lblPartyID.Text);
                clsPartyMaster.nPartyTypeID        = Convert.ToInt64(cmbPartyType.SelectedValue);
                clsPartyMaster.sPartyName          = Convert.ToString(txtPartyName.Text.Trim());
                clsPartyMaster.sPartyCode          = Convert.ToString(txtPartyCode.Text.Trim());
                clsPartyMaster.sPartyAbbrivation   = Convert.ToString(txtPartyAbbrivation.Text.Trim());
                clsPartyMaster.sAddressLine1       = Convert.ToString(txtAddressLine1.Text.Trim());
                clsPartyMaster.sAddressLine2       = Convert.ToString(txtAddressLine2.Text.Trim());
                clsPartyMaster.sCity               = Convert.ToString(txtCity.Text.Trim());
                clsPartyMaster.sState              = Convert.ToString(txtState.Text.Trim());
                clsPartyMaster.sCountry            = Convert.ToString(txtCountry.Text.Trim());
                clsPartyMaster.sPincode            = Convert.ToString(txtPincode.Text.Trim());
                clsPartyMaster.sEmail              = Convert.ToString(txtEmail.Text.Trim());
                clsPartyMaster.sAllPhoneNo         = sPhoneAll;
                clsPartyMaster.sFax                = Convert.ToString(txtFaxNo.Text.ToString());
                clsPartyMaster.sGSTNo              = Convert.ToString(txtGSTNo.Text.Trim());
                clsPartyMaster.sPANNo              = Convert.ToString(txtPANNo.Text.Trim());
                clsPartyMaster.sTANNo              = Convert.ToString(txtTANNo.Text.Trim());
                clsPartyMaster.sBillToAddressLine1 = Convert.ToString(txtBillToAddressLine1.Text.Trim());
                clsPartyMaster.sBillToAddressLine2 = Convert.ToString(txtBillToAddressLine1.Text.Trim());
                clsPartyMaster.sBillToPincode      = Convert.ToString(txtBillToPincode.Text.Trim());
                clsPartyMaster.sShipToAddressLine1 = Convert.ToString(txtShipToAddressLine1.Text.Trim());
                clsPartyMaster.sShipToAddressLine2 = Convert.ToString(txtShipToPincode.Text.Trim());
                clsPartyMaster.sShipToPincode      = Convert.ToString(txtShipToPincode.Text.Trim());

                Int64 nCrewMemberID = clsPartyMaster.InsertUpdatePartyMaster();

                if (nCrewMemberID != 0)
                {
                    MessageBox.Show("Party is saved successfully.", clsGlobal.MessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    ClearForm();
                }
                else
                {
                    MessageBox.Show("Error while saving party.", clsGlobal.MessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.ToString(), clsGlobal._sMessageboxCaption, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }