Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            switch (tcList.CurrentPage.Name)
            {
            case "tabCars":
                if (StartForm(new frmCarsEdit(null, false)) == DialogResult.Yes)
                {
                    int nCarID = (int)GotParam.GetValue(0);
                    grdCars_Restore();
                    if (nCarID > 0)
                    {
                        grdCars.GridSource.Position = grdCars.GridSource.Find(oCarList.ColumnID, nCarID);
                    }
                }
                break;

            case "tabCarsTypes":
                if (StartForm(new frmCarsTypesEdit(null)) == DialogResult.Yes)
                {
                    int nCarTypeID = (int)GotParam.GetValue(0);
                    grdCarsTypes_Restore();
                    if (nCarTypeID > 0)
                    {
                        grdCarsTypes.GridSource.Position = grdCarsTypes.GridSource.Find(oCarTypeList.ColumnID, nCarTypeID);
                    }
                }
                break;
            }
        }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            switch (tcList.CurrentPage.Name)
            {
            case "tabData":
                if (StartForm(new frmPartnersEdit(null)) == DialogResult.Yes)
                {
                    int nPartnerID = (int)GotParam.GetValue(0);
                    grdData_Restore();
                    if (nPartnerID > 0)
                    {
                        grdData.GridSource.Position = grdData.GridSource.Find(oPartnerList.ColumnID, nPartnerID);
                    }
                }
                break;

            case "tabPartnersRoots":
                break;

            case "tabPrintForms":
                if (StartForm(new frmPrintFormsEdit(null)) == DialogResult.Yes)
                {
                    int nPrintFormID = (int)GotParam.GetValue(0);
                    grdPrintForms_Restore();
                    if (nPrintFormID > 0)
                    {
                        grdPrintForms.GridSource.Position = grdPrintForms.GridSource.Find("ID", nPrintFormID);
                    }
                }
                break;
            }
        }
Ejemplo n.º 3
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmPassesEdit(null)) == DialogResult.Yes)
     {
         int nPassID = (int)GotParam.GetValue(0);
         grdData_Restore();
         if (nPassID > 0)
         {
             grdData.GridSource.Position = grdData.GridSource.Find(oPassList.ColumnID, nPassID);
         }
     }
 }
Ejemplo n.º 4
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmSalaryExtraWorksEdit(null)) == DialogResult.Yes)
     {
         int nSalaryExtraWorkID = (int)GotParam.GetValue(0);
         dgvExtraWorks_Restore();
         if (nSalaryExtraWorkID > 0)
         {
             dgvExtraWorks.GridSource.Position = dgvExtraWorks.GridSource.Find("ID", nSalaryExtraWorkID);
         }
     }
 }
Ejemplo n.º 5
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmInventoriesAdd(0)) == DialogResult.Yes)
     {
         int nInventoryID = (int)GotParam.GetValue(0);
         grdData_Restore();
         if (nInventoryID > 0)
         {
             grdData.GridSource.Position = grdData.GridSource.Find(oInventoryList.ColumnID, nInventoryID);
         }
     }
 }
Ejemplo n.º 6
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmActsEdit(0, null, null)) == DialogResult.Yes)
     {
         int nActID = (int)GotParam.GetValue(0);
         dgvActs_Restore();
         if (nActID > 0)
         {
             dgvActs.GridSource.Position = dgvActs.GridSource.Find(oActList.ColumnID, nActID);
         }
     }
 }
Ejemplo n.º 7
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmCarsTasksEdit(0)) == DialogResult.Yes)
     {
         int nCarTaskID = (int)GotParam.GetValue(0);
         dgvCarsTasks_Restore();
         if (nCarTaskID > 0)
         {
             dgvCarsTasks.GridSource.Position = dgvCarsTasks.GridSource.Find(oCarTaskList.ColumnID, nCarTaskID);
         }
     }
 }
Ejemplo n.º 8
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (StartForm(new frmUsersEdit(0)) == DialogResult.Yes)
     {
         int nUserID = (int)GotParam.GetValue(0);
         grdData_Restore();
         if (nUserID > 0)
         {
             grdData.GridSource.Position = grdData.GridSource.Find(oUserList.ColumnID, nUserID);
             if (grdData.GridSource.Position < 0)
             {
                 grdData.GridSource.MoveFirst();
             }
         }
     }
 }
Ejemplo n.º 9
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            int nSalaryTariffID = 0;

            if (grdData.Rows.Count > 0 && grdData.CurrentRow != null)
            {
                nSalaryTariffID = -(int)grdData.CurrentRow.Cells["grcID"].Value;
            }

            if (StartForm(new frmSalaryTariffsEdit(nSalaryTariffID)) == DialogResult.Yes)
            {
                nSalaryTariffID = (int)GotParam.GetValue(0);
                grdData_Restore();
                if (nSalaryTariffID > 0)
                {
                    grdData.GridSource.Position = grdData.GridSource.Find("ID", nSalaryTariffID);
                    if (grdData.GridSource.Position < 0)
                    {
                        grdData.GridSource.MoveFirst();
                    }
                }
            }
        }
Ejemplo n.º 10
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            switch (tcList.CurrentPage.Name)
            {
            case "tabWayBills":
                DialogResult result = StartForm(new frmWayBillsEdit(null));
                grdWayBills_Restore();

                if (result == DialogResult.Yes)
                {
                    int nWayBillID = (int)GotParam.GetValue(0);
                    if (nWayBillID > 0)
                    {
                        grdWayBills.GridSource.Position = grdWayBills.GridSource.Find(oWayBillList.ColumnID, nWayBillID);
                    }
                }
                break;

            case "tabFillings":
                // не используется
                break;
            }
        }
Ejemplo n.º 11
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            switch (tcData.CurrentPage.Name)
            {
            case "tabEmployees":
                if (StartForm(new frmEmployeesDriversEdit(null)) == DialogResult.Yes)
                {
                    int nEmployeeID = (int)GotParam.GetValue(0);
                    grdEmployees_Restore();
                    if (nEmployeeID > 0)
                    {
                        grdEmployees.GridSource.Position = grdEmployees.GridSource.Find(oEmployeeList.ColumnID, nEmployeeID);
                        if (grdEmployees.GridSource.Position < 0)
                        {
                            grdEmployees.GridSource.MoveFirst();
                        }
                    }
                }
                break;

            case "tabJobTitles":
                break;
            }
        }