示例#1
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("CostCenterList", "CostCenterId");
            }
            else
            {
                lngID = Convert.ToInt32(hfID.Value);
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), txtCode.Text.Trim(), txtName.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");

            objSOFMgr.InsertCostCenterList(objCommonSetup, hfIsUpdate.Value, IsDelete);

            lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete);
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#2
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            string EmpID = Session["EMPLOYEEID"].ToString();

            string strMonth = Convert.ToString(DateTime.Today.Month);
            string strYear  = Convert.ToString(DateTime.Today.Year);

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), "", "Y", "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");

            objPayRptMgr.UpdateAttandance(objCommonSetup, this.ddlRemarksType.SelectedItem.Value.ToString(), this.txtRemarks.Text.ToString(),
                                          this.txtFromDate.Text.ToString(), this.txtToDate.Text.ToString(), EmpID);

            objTSM.GenerateTimeSheet(EmpID, strMonth, strYear, Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()));

            this.UpdateFoxpro();

            lblMsg.Text = Common.GetMessage("Y", IsDelete);

            Common.EmptyTextBoxValues(this);
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#3
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            MasterTablesManager MasMgr = new MasterTablesManager();

            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("EmpNatureList", "EmpNatureID");
            }
            else
            {
                lngID = Convert.ToInt32(hfID.Value);
            }

            clsCommonSetup objEmpType = new clsCommonSetup(lngID.ToString(), "", txtEmpNature.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"),
                                                           "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");

            MasMgr.InsertEmpNature(objEmpType, hfIsUpdate.Value, IsDelete);

            lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete);

            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#4
0
    private void SaveData(string IsDelete)
    {
        try
        {
            if (hfIsUpdate.Value == "Y")
            {
                hfId.Value = hfId.Value;
            }
            else
            {
                hfId.Value = Common.getMaxId("TrainingMode", "TrainingModeID");
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(hfId.Value.ToString(), txtName.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            objEmpMgr.InsertTrainingMode(objCommonSetup, hfIsUpdate.Value, IsDelete);

            lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete);
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
    // Insert or Update  or Delete Data of Learning Activity table
    public void InsertLearningActivity(clsCommonSetup clsCommon, string IsUpdate, string IsDelete)
    {
        SqlCommand command = new SqlCommand("proc_Insert_LearningActivityList");

        command.CommandType = CommandType.StoredProcedure;

        SqlParameter p_LActivityId = command.Parameters.Add("LActivityId", SqlDbType.BigInt);

        p_LActivityId.Direction = ParameterDirection.Input;
        p_LActivityId.Value     = clsCommon.ID;

        SqlParameter p_LActivityName = command.Parameters.Add("LActivityName", SqlDbType.VarChar);

        p_LActivityName.Direction = ParameterDirection.Input;
        p_LActivityName.Value     = clsCommon.Name;

        SqlParameter p_IsActive = command.Parameters.Add("IsActive", SqlDbType.Char);

        p_IsActive.Direction = ParameterDirection.Input;
        p_IsActive.Value     = clsCommon.IsActive;

        SqlParameter p_isDeleted = command.Parameters.Add("IsDeleted", SqlDbType.Char);

        p_isDeleted.Direction = ParameterDirection.Input;
        p_isDeleted.Value     = clsCommon.IsDeleted;

        SqlParameter p_InsertedBy = command.Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command.Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;

        SqlParameter p_IsUpdate = command.Parameters.Add("IsUpdate", SqlDbType.Char);

        p_IsUpdate.Direction = ParameterDirection.Input;
        p_IsUpdate.Value     = IsUpdate;

        SqlParameter p_IsDelete = command.Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;

        try
        {
            objDC.ExecuteQuery(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }
示例#6
0
    public void InsertGroup(clsCommonSetup clsCommon, string IsUpdate, string IsDelete)
    {
        // sproc functionality
        SqlCommand command = new SqlCommand("proc_InUp_KPIGroupList");

        command.CommandType = CommandType.StoredProcedure;

        SqlParameter p_Id = command.Parameters.Add("GroupId", SqlDbType.BigInt);

        p_Id.Direction = ParameterDirection.Input;
        p_Id.Value     = Convert.ToInt32(clsCommon.ID);

        SqlParameter p_Name = command.Parameters.Add("GroupName", SqlDbType.VarChar);

        p_Name.Direction = ParameterDirection.Input;
        p_Name.Value     = clsCommon.Name;

        SqlParameter p_IsActive = command.Parameters.Add("IsActive", SqlDbType.Char);

        p_IsActive.Direction = ParameterDirection.Input;
        p_IsActive.Value     = clsCommon.IsActive;

        SqlParameter p_InsertedBy = command.Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command.Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;


        SqlParameter p_IsUpdate = command.Parameters.Add("IsUpdate", SqlDbType.Char);

        p_IsUpdate.Direction = ParameterDirection.Input;
        p_IsUpdate.Value     = IsUpdate;

        SqlParameter p_IsDelete = command.Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;

        try
        {
            objDC.ExecuteQuery(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }
    public void InsertEmpDocument(clsCommonSetup clsCommon, string sEmpID, string sfileName, string sFilePath, string IsDelete)
    {
        // sproc functionality
        SqlCommand command = new SqlCommand("proc_InUp_EmpDocument");

        command.CommandType = CommandType.StoredProcedure;

        SqlParameter p_Id = command.Parameters.Add("ID", SqlDbType.BigInt);

        p_Id.Direction = ParameterDirection.Input;
        p_Id.Value     = Convert.ToInt32(clsCommon.ID);

        SqlParameter p_Name = command.Parameters.Add("EmpId", SqlDbType.Char);

        p_Name.Direction = ParameterDirection.Input;
        p_Name.Value     = sEmpID;

        SqlParameter p_GroupId = command.Parameters.Add("FileName", SqlDbType.VarChar);

        p_GroupId.Direction = ParameterDirection.Input;
        p_GroupId.Value     = sfileName;

        SqlParameter p_IndTypeId = command.Parameters.Add("FilePath", SqlDbType.VarChar);

        p_IndTypeId.Direction = ParameterDirection.Input;
        p_IndTypeId.Value     = sFilePath;

        SqlParameter p_InsertedBy = command.Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command.Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;

        SqlParameter p_IsDelete = command.Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;

        try
        {
            objDC.ExecuteQuery(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }
    private void SaveData(string IsDelete)
    {
        //if (hfIsUpdate.Value == "N")
        //    hfID.Value = objDB.GerMaxIDNumber("TrainingService", "TraServiceID").ToString();
        //else
        //    hfID.Value = Convert.ToInt32(hfID.Value).ToString();
        try
        {
            string         maxTrnid      = "";
            clsCommonSetup objTrainSetup = new clsCommonSetup();
            if (this.txtTrainingName.Text.Trim() != "")
            {
                maxTrnid = Common.getMaxId("TrainingList", "TrainingId");

                objTrainSetup = new clsCommonSetup(maxTrnid, this.txtTrainingName.Text.Trim(), "Y", "N",
                                                   Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);
                //objTrmMgr.InsertTraining(objTrainSetup, "N", IsDelete);
            }
            string         MaxResourceId    = "";
            clsCommonSetup objResourceSetup = new clsCommonSetup();
            if (this.txtResourcePerson.Text.Trim() != "")
            {
                MaxResourceId = Common.getMaxId("ResourcePersonList", "ResourcePersonId");

                objResourceSetup = new clsCommonSetup(MaxResourceId, this.txtResourcePerson.Text.Trim(), "Y", "N",
                                                      Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);
                //objTrmMgr.InsertResourcePerson(objResourceSetup, "N", IsDelete);
            }
            objTrmMgr.InsertTrainingService(this.BindObject(maxTrnid, MaxResourceId), objTrainSetup, objResourceSetup, Session["USERID"].ToString(), hfIsUpdate.Value, IsDelete);
            lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete);
            //Common.EmptyTextBoxValues(this);

            //this.EntryMode(false);
            if (ddlTraining.SelectedIndex == 0)
            {
                Common.FillDropDownList_Nil(objMasMgr.SelectTrainingName(0, "Y"), ddlTraining);
                txtTrainingName.Text = "";
            }
            if (ddlResourcePersonId.SelectedIndex == 0)
            {
                Common.FillDropDownList_Nil(objMasMgr.SelectResourcePersonList(0, "Y"), ddlResourcePersonId);
                txtResourcePerson.Text = "";
            }
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#9
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("KPIEmpkpiMst", "EKPIID");
            }
            else
            {
                lngID = Convert.ToInt32(hfId.Value);
            }


            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), "", (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            //objKpi.InsertEmpKpiData(grEmpKpi, ddlMonth.SelectedValue.Trim(), ddlYear.SelectedValue.Trim(),
            //Common.ReturnDate(txtIssueDate.Text.Trim()), Session["USERID"].ToString().Trim(), Common.SetDateTime(DateTime.Now.ToString()));


            objKpi.InsertEmpKpiData(objCommonSetup,
                                    grEmpKpi,
                                    ddlGroup.SelectedValue.ToString(),
                                    ddlQuarter.SelectedValue.ToString(),
                                    txtYear.Text.ToString(),
                                    txtEmpID.Text.ToString().Trim(),
                                    hfIsUpdate.Value,
                                    IsDelete);

            if (hfIsUpdate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#10
0
    private void SaveData(string sEmpID, string sfileName, string sFilePath)
    {
        long lngID = 0;

        try
        {
            lngID = objDB.GerMaxIDNumber("EmpDocInfo", "ID");

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), "", "Y", "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");

            utm.InsertEmpDocument(objCommonSetup, sEmpID, sfileName, sFilePath, "N");
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#11
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            MasterTablesManager MasMgr = new MasterTablesManager();
            //Filling Class Properties with values
            if (hfIsUpadate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("LocationCategory", "LocCatId");
            }
            else
            {
                lngID = Convert.ToInt32(hfID.Value);
            }

            clsCommonSetup objSetup = new clsCommonSetup(lngID.ToString(), txtClinicType.Text.Trim(), (ChkIsActive.Checked == true ? "N" : "Y"), "N",
                                                         Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N");


            MasMgr.InsertLocationCategory(objSetup, hfIsUpadate.Value, IsDelete);

            if (hfIsUpadate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#12
0
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("KPIScoring", "ScoringID");
            }
            else
            {
                lngID = Convert.ToInt32(hfId.Value);
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), txtRating.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            objKpi.InsertScoring(objCommonSetup, ddlGroup.SelectedValue.ToString(), ddlQuarter.SelectedValue.ToString(), NullOrEmpty(txtYear.Text.ToString()),
                                 NullOrEmpty(txtMFrom.Text.ToString().Trim()), NullOrEmpty(txtMTo.Text.ToString().Trim()), txtScore.Text.Trim(), hfIsUpdate.Value, IsDelete);

            if (hfIsUpdate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
    private void SaveData(string IsDelete)
    {
        long lngID = 0;

        try
        {
            if (hfIsUpdate.Value == "N")
            {
                lngID = objDB.GerMaxIDNumber("KPIIndicatirType", "IndTypeId");
            }
            else
            {
                lngID = Convert.ToInt32(hfId.Value);
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(lngID.ToString(), txtIndicatirType.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            objKpi.InsertIndicatirType(objCommonSetup, hfIsUpdate.Value, IsDelete);

            if (hfIsUpdate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#14
0
    private void SaveData(string IsDelete)
    {
        try
        {
            if (hfIsUpdate.Value == "Y")
            {
                hfId.Value = hfId.Value;
            }
            else
            {
                hfId.Value = Common.getMaxId("SubjectList", "SubjectId");
            }

            clsCommonSetup objCommonSetup = new clsCommonSetup(hfId.Value.ToString(), txtName.Text.Trim(), (chkInActive.Checked == true ? "N" : "Y"), "N",
                                                               Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", IsDelete);

            objEmpMgr.InsertSubject(objCommonSetup, hfIsUpdate.Value, IsDelete);

            if (hfIsUpdate.Value == "N")
            {
                lblMsg.Text = "Record Saved Successfully";
            }
            else
            {
                lblMsg.Text = "Record Updated Successfully";
            }
            Common.EmptyTextBoxValues(this);
            this.EntryMode(false);
            this.OpenRecord();
        }
        catch (Exception ex)
        {
            lblMsg.Text = "";
            throw (ex);
        }
    }
示例#15
0
    public void UpdateAttandance(clsCommonSetup clsCommon, string strRemarkType, string remarks, string strFdate, string strTdate, string empID)
    {
        int i = 0;

        SqlCommand[] command = new SqlCommand[2];

        command[i]             = new SqlCommand("proc_Update_Attandance");
        command[i].CommandType = CommandType.StoredProcedure;

        SqlParameter p_RType = command[i].Parameters.Add("RemarksType", SqlDbType.Char);

        p_RType.Direction = ParameterDirection.Input;
        p_RType.Value     = strRemarkType;

        SqlParameter p_Remarks = command[i].Parameters.Add("Remarks", SqlDbType.VarChar);

        p_Remarks.Direction = ParameterDirection.Input;
        p_Remarks.Value     = remarks;

        SqlParameter p_Fdate = command[i].Parameters.Add("FromDate", SqlDbType.DateTime);

        p_Fdate.Direction = ParameterDirection.Input;
        p_Fdate.Value     = Common.ReturnDate(strFdate);

        SqlParameter p_Tdate = command[i].Parameters.Add("ToDate", SqlDbType.DateTime);

        p_Tdate.Direction = ParameterDirection.Input;
        p_Tdate.Value     = Common.ReturnDate(strTdate);

        SqlParameter p_InsertedBy = command[i].Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_empID = command[i].Parameters.Add("EmployeeID", SqlDbType.VarChar);

        p_empID.Direction = ParameterDirection.Input;
        p_empID.Value     = empID;

        i++;
        command[i]             = new SqlCommand("proc_Update_Attandance");
        command[i].CommandType = CommandType.StoredProcedure;

        SqlParameter p_AttRType = command[i].Parameters.Add("RemarksType", SqlDbType.Char);

        p_AttRType.Direction = ParameterDirection.Input;
        p_AttRType.Value     = strRemarkType;

        SqlParameter p_AttRemarks = command[i].Parameters.Add("Remarks", SqlDbType.VarChar);

        p_AttRemarks.Direction = ParameterDirection.Input;
        p_AttRemarks.Value     = remarks;

        SqlParameter p_AttFdate = command[i].Parameters.Add("FromDate", SqlDbType.DateTime);

        p_AttFdate.Direction = ParameterDirection.Input;
        p_AttFdate.Value     = Common.ReturnDate(strFdate);

        SqlParameter p_AttTdate = command[i].Parameters.Add("ToDate", SqlDbType.DateTime);

        p_AttTdate.Direction = ParameterDirection.Input;
        p_AttTdate.Value     = Common.ReturnDate(strTdate);

        SqlParameter p_AttInsertedBy = command[i].Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_AttInsertedBy.Direction = ParameterDirection.Input;
        p_AttInsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_AttempID = command[i].Parameters.Add("EmployeeID", SqlDbType.VarChar);

        p_AttempID.Direction = ParameterDirection.Input;
        p_AttempID.Value     = empID;

        try
        {
            objDC.MakeTransaction(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }
示例#16
0
    // Emp KPI Entry
    public void UpdateEmpKpi(clsCommonSetup clsCommon, GridView grv, string strGroup, string strQuertar, string strYear,
                             string strEmpId, string IsUpdate, string IsDelete)
    {
        int i = 0;

        SqlCommand[] command;
        command = new SqlCommand[grv.Rows.Count];

        foreach (GridViewRow gRow in grv.Rows)
        {
            CheckBox chkB = (CheckBox)gRow.Cells[0].FindControl("chkBox");
            if (chkB.Checked == true)
            {
                command[i]             = new SqlCommand("Proc_Up_KPIEmpkpi");
                command[i].CommandType = CommandType.StoredProcedure;

                SqlParameter p_EKPIID = command[i].Parameters.Add("EKPIID", SqlDbType.BigInt);
                p_EKPIID.Direction = ParameterDirection.Input;
                p_EKPIID.Value     = Convert.ToInt32(grv.DataKeys[gRow.DataItemIndex].Values[2].ToString().Trim());

                SqlParameter p_EMPID = command[i].Parameters.Add("EmpId", SqlDbType.Char);
                p_EMPID.Direction = ParameterDirection.Input;
                p_EMPID.Value     = strEmpId;

                SqlParameter p_SBUId = command[i].Parameters.Add("GroupId", SqlDbType.BigInt);
                p_SBUId.Direction = ParameterDirection.Input;
                p_SBUId.Value     = Convert.ToInt32(strGroup);

                SqlParameter p_QuarterId = command[i].Parameters.Add("QuarterId", SqlDbType.BigInt);
                p_QuarterId.Direction = ParameterDirection.Input;
                p_QuarterId.Value     = Convert.ToInt32(strQuertar);

                SqlParameter p_VYear = command[i].Parameters.Add("VYear", SqlDbType.BigInt);
                p_VYear.Direction = ParameterDirection.Input;
                p_VYear.Value     = Convert.ToInt32(strYear);


                SqlParameter p_KpiId = command[i].Parameters.Add("KpiId", SqlDbType.BigInt);
                p_KpiId.Direction = ParameterDirection.Input;
                p_KpiId.Value     = Convert.ToInt32(grv.DataKeys[gRow.DataItemIndex].Values[1].ToString().Trim());

                TextBox      txtM     = (TextBox)gRow.Cells[6].FindControl("txtAchive");
                SqlParameter p_Target = command[i].Parameters.Add("Achive", SqlDbType.BigInt);
                p_Target.Direction = ParameterDirection.Input;
                p_Target.Value     = Convert.ToInt32("0" + txtM.Text);

                TextBox      txtB     = (TextBox)gRow.Cells[7].FindControl("txtAchivePercent");
                SqlParameter p_Measur = command[i].Parameters.Add("AchivePercent", SqlDbType.BigInt);
                p_Measur.Direction = ParameterDirection.Input;
                p_Measur.Value     = Convert.ToInt32("0" + txtB.Text);

                SqlParameter p_IsActive1 = command[i].Parameters.Add("IsActive", SqlDbType.Char);
                p_IsActive1.Direction = ParameterDirection.Input;
                p_IsActive1.Value     = clsCommon.IsActive;

                SqlParameter p_InsertedBy1 = command[i].Parameters.Add("InsertedBy", SqlDbType.VarChar);
                p_InsertedBy1.Direction = ParameterDirection.Input;
                p_InsertedBy1.Value     = clsCommon.InsertedBy;

                SqlParameter p_InsertedDate1 = command[i].Parameters.Add("InsertedDate", SqlDbType.DateTime);
                p_InsertedDate1.Direction = ParameterDirection.Input;
                p_InsertedDate1.Value     = clsCommon.InsertedDate;

                SqlParameter p_IsUpdate1 = command[i].Parameters.Add("IsUpdate", SqlDbType.Char);
                p_IsUpdate1.Direction = ParameterDirection.Input;
                p_IsUpdate1.Value     = IsUpdate;

                SqlParameter p_IsDelete1 = command[i].Parameters.Add("IsDelete", SqlDbType.Char);
                p_IsDelete1.Direction = ParameterDirection.Input;
                p_IsDelete1.Value     = IsDelete;

                i++;
            }
        }
        objDC.MakeTransaction(command);
    }
示例#17
0
    // Emp KPI Entry
    public void InsertEmpKpiData(clsCommonSetup clsCommon, GridView grv, string strGroup, string strQuertar, string strYear, string strEmpId, string IsUpdate, string IsDelete)
    {
        int i = 0;

        SqlCommand[] command;
        command = new SqlCommand[grv.Rows.Count + 1];
        //DELETE FROM DETAILS TABLE
        command[0]             = new SqlCommand("proc_InUp_KPIEmpkpiMst");
        command[0].CommandType = CommandType.StoredProcedure;

        SqlParameter p_UserId = command[0].Parameters.Add("EKPIID", SqlDbType.BigInt);

        p_UserId.Direction = ParameterDirection.Input;
        p_UserId.Value     = Convert.ToInt32(clsCommon.ID);

        SqlParameter p_DivisionId = command[0].Parameters.Add("EmpId", SqlDbType.Char);

        p_DivisionId.Direction = ParameterDirection.Input;
        p_DivisionId.Value     = strEmpId;

        SqlParameter p_SBUId = command[0].Parameters.Add("GroupId", SqlDbType.BigInt);

        p_SBUId.Direction = ParameterDirection.Input;
        p_SBUId.Value     = Convert.ToInt32(strGroup);

        SqlParameter p_QuarterId = command[0].Parameters.Add("QuarterId", SqlDbType.BigInt);

        p_QuarterId.Direction = ParameterDirection.Input;
        p_QuarterId.Value     = Convert.ToInt32(strQuertar);

        SqlParameter p_VYear = command[0].Parameters.Add("VYear", SqlDbType.BigInt);

        p_VYear.Direction = ParameterDirection.Input;
        p_VYear.Value     = Convert.ToInt32(strYear);

        SqlParameter p_IsActive = command[0].Parameters.Add("IsActive", SqlDbType.Char);

        p_IsActive.Direction = ParameterDirection.Input;
        p_IsActive.Value     = clsCommon.IsActive;

        SqlParameter p_InsertedBy = command[0].Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command[0].Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;

        SqlParameter p_IsUpdate = command[0].Parameters.Add("IsUpdate", SqlDbType.Char);

        p_IsUpdate.Direction = ParameterDirection.Input;
        p_IsUpdate.Value     = IsUpdate;

        SqlParameter p_IsDelete = command[0].Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;


        i = 1;
        // long lngTransID = Convert.ToInt64(Common.getMaxId("KPIEmpkpiDetail", "KPIDtlId"));

        foreach (GridViewRow gRow in grv.Rows)
        {
            CheckBox chkB = (CheckBox)gRow.Cells[0].FindControl("chkBox");
            if (chkB.Checked == true)
            {
                command[i]             = new SqlCommand("Proc_InUp_KPIEmpkpiDetail");
                command[i].CommandType = CommandType.StoredProcedure;

                SqlParameter p_EKPIID = command[i].Parameters.Add("EKPIID", SqlDbType.BigInt);
                p_EKPIID.Direction = ParameterDirection.Input;
                p_EKPIID.Value     = Convert.ToInt32(clsCommon.ID);

                SqlParameter p_EMPID = command[i].Parameters.Add("EmpId", SqlDbType.Char);
                p_EMPID.Direction = ParameterDirection.Input;
                p_EMPID.Value     = strEmpId;

                SqlParameter p_KpiId = command[i].Parameters.Add("KpiId", SqlDbType.BigInt);
                p_KpiId.Direction = ParameterDirection.Input;
                p_KpiId.Value     = Convert.ToInt32(grv.DataKeys[gRow.DataItemIndex].Values[1].ToString().Trim());
                // Convert.ToInt32(gRow.Cells[2].Text.Trim()); //gRow.Cells[2].Text.Trim()
                //grScoring.DataKeys[_gridView.SelectedIndex].Values[0].ToString();

                TextBox      txtB     = (TextBox)gRow.Cells[4].FindControl("txtMeasur");
                SqlParameter p_Measur = command[i].Parameters.Add("Measur", SqlDbType.VarChar);
                p_Measur.Direction = ParameterDirection.Input;
                p_Measur.Value     = txtB.Text; //gRow.Cells[4].Text.Trim();
                // grv.SelectedRow.Cells[3].Text

                TextBox      txtM     = (TextBox)gRow.Cells[5].FindControl("txtTarget");
                SqlParameter p_Target = command[i].Parameters.Add("Target", SqlDbType.VarChar);
                p_Target.Direction = ParameterDirection.Input;
                p_Target.Value     = txtM.Text; //gRow.Cells[5].Text.Trim();

                SqlParameter p_IsActive1 = command[i].Parameters.Add("IsActive", SqlDbType.Char);
                p_IsActive1.Direction = ParameterDirection.Input;
                p_IsActive1.Value     = clsCommon.IsActive;

                SqlParameter p_InsertedBy1 = command[i].Parameters.Add("InsertedBy", SqlDbType.VarChar);
                p_InsertedBy1.Direction = ParameterDirection.Input;
                p_InsertedBy1.Value     = clsCommon.InsertedBy;

                SqlParameter p_InsertedDate1 = command[i].Parameters.Add("InsertedDate", SqlDbType.DateTime);
                p_InsertedDate1.Direction = ParameterDirection.Input;
                p_InsertedDate1.Value     = clsCommon.InsertedDate;

                SqlParameter p_IsUpdate1 = command[i].Parameters.Add("IsUpdate", SqlDbType.Char);
                p_IsUpdate1.Direction = ParameterDirection.Input;
                p_IsUpdate1.Value     = IsUpdate;

                SqlParameter p_IsDelete1 = command[i].Parameters.Add("IsDelete", SqlDbType.Char);
                p_IsDelete1.Direction = ParameterDirection.Input;
                p_IsDelete1.Value     = IsDelete;

                i++;
            }
        }
        objDC.MakeTransaction(command);
    }
示例#18
0
    public void InsertScoring(clsCommonSetup clsCommon, string strGroupID, string strQuarterID, string txtYear, string txtMFrom, string txtMTo, string strScore, string IsUpdate, string IsDelete)
    {
        // sproc functionality
        SqlCommand command = new SqlCommand("proc_InUp_KPIScoring");

        command.CommandType = CommandType.StoredProcedure;

        SqlParameter p_Id = command.Parameters.Add("ScoringID", SqlDbType.BigInt);

        p_Id.Direction = ParameterDirection.Input;
        p_Id.Value     = Convert.ToInt32(clsCommon.ID);

        SqlParameter p_Name = command.Parameters.Add("Rating", SqlDbType.VarChar);

        p_Name.Direction = ParameterDirection.Input;
        p_Name.Value     = clsCommon.Name;

        SqlParameter p_GroupId = command.Parameters.Add("GroupId", SqlDbType.BigInt);

        p_GroupId.Direction = ParameterDirection.Input;
        p_GroupId.Value     = Convert.ToInt32(strGroupID);

        SqlParameter p_IndTypeId = command.Parameters.Add("QuarterId", SqlDbType.BigInt);

        p_IndTypeId.Direction = ParameterDirection.Input;
        p_IndTypeId.Value     = Convert.ToInt32(strQuarterID);

        SqlParameter p_VYear = command.Parameters.Add("VYear", SqlDbType.BigInt);

        p_VYear.Direction = ParameterDirection.Input;
        p_VYear.Value     = Convert.ToInt32(txtYear);

        SqlParameter p_MarksF = command.Parameters.Add("MarksF", SqlDbType.BigInt);

        p_MarksF.Direction = ParameterDirection.Input;
        p_MarksF.Value     = Convert.ToInt32(txtMFrom);

        SqlParameter p_MarksTo = command.Parameters.Add("MarksTo", SqlDbType.BigInt);

        p_MarksTo.Direction = ParameterDirection.Input;
        p_MarksTo.Value     = Convert.ToInt32(txtMTo);

        SqlParameter p_txtScore = command.Parameters.Add("Score", SqlDbType.BigInt);

        p_txtScore.Direction = ParameterDirection.Input;
        p_txtScore.Value     = Convert.ToInt32(strScore);

        SqlParameter p_IsActive = command.Parameters.Add("IsActive", SqlDbType.Char);

        p_IsActive.Direction = ParameterDirection.Input;
        p_IsActive.Value     = clsCommon.IsActive;

        SqlParameter p_InsertedBy = command.Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command.Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;

        SqlParameter p_IsUpdate = command.Parameters.Add("IsUpdate", SqlDbType.Char);

        p_IsUpdate.Direction = ParameterDirection.Input;
        p_IsUpdate.Value     = IsUpdate;

        SqlParameter p_IsDelete = command.Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;

        try
        {
            objDC.ExecuteQuery(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }
示例#19
0
    // Insert or Update  or Delete Data of Appraisal Rating table
    public void InsertAppraisalRating(clsCommonSetup clsCommon, string strRatingMin, string strRatingMax, string strBasicPercent, string IsUpdate, string IsDelete)
    {
        SqlCommand command = new SqlCommand("proc_Insert_AppraisalRatingList");

        command.CommandType = CommandType.StoredProcedure;

        SqlParameter p_Id = command.Parameters.Add("RatingId", SqlDbType.BigInt);

        p_Id.Direction = ParameterDirection.Input;
        p_Id.Value     = clsCommon.ID;

        SqlParameter p_Name = command.Parameters.Add("RatingName", SqlDbType.VarChar);

        p_Name.Direction = ParameterDirection.Input;
        p_Name.Value     = clsCommon.Name;

        SqlParameter p_RatingMin = command.Parameters.Add("RatingMin", SqlDbType.BigInt);

        p_RatingMin.Direction = ParameterDirection.Input;
        p_RatingMin.Value     = strRatingMin;

        SqlParameter p_RatingMax = command.Parameters.Add("RatingMax", SqlDbType.BigInt);

        p_RatingMax.Direction = ParameterDirection.Input;
        p_RatingMax.Value     = strRatingMax;

        SqlParameter p_BasicPercent = command.Parameters.Add("BasicPercent", SqlDbType.Decimal);

        p_BasicPercent.Direction = ParameterDirection.Input;
        p_BasicPercent.Value     = strBasicPercent;

        SqlParameter p_IsActive = command.Parameters.Add("IsActive", SqlDbType.Char);

        p_IsActive.Direction = ParameterDirection.Input;
        p_IsActive.Value     = clsCommon.IsActive;

        SqlParameter p_isDeleted = command.Parameters.Add("IsDeleted", SqlDbType.Char);

        p_isDeleted.Direction = ParameterDirection.Input;
        p_isDeleted.Value     = clsCommon.IsDeleted;

        SqlParameter p_InsertedBy = command.Parameters.Add("InsertedBy", SqlDbType.VarChar);

        p_InsertedBy.Direction = ParameterDirection.Input;
        p_InsertedBy.Value     = clsCommon.InsertedBy;

        SqlParameter p_InsertedDate = command.Parameters.Add("InsertedDate", SqlDbType.DateTime);

        p_InsertedDate.Direction = ParameterDirection.Input;
        p_InsertedDate.Value     = clsCommon.InsertedDate;

        SqlParameter p_IsUpdate = command.Parameters.Add("IsUpdate", SqlDbType.Char);

        p_IsUpdate.Direction = ParameterDirection.Input;
        p_IsUpdate.Value     = IsUpdate;

        SqlParameter p_IsDelete = command.Parameters.Add("IsDelete", SqlDbType.Char);

        p_IsDelete.Direction = ParameterDirection.Input;
        p_IsDelete.Value     = IsDelete;

        try
        {
            objDC.ExecuteQuery(command);
        }
        catch (Exception ex)
        {
            throw (ex);
        }
        finally
        {
            command = null;
        }
    }