コード例 #1
0
    public int DeleteEmployee(EmployeeListUI employeeListUI)
    {
        int result = 0;

        result = employeeListDAL.DeleteEmployee(employeeListUI);
        return(result);
    }
コード例 #2
0
 private void SearchEmployeeList()
 {
     try
     {
         EmployeeListUI employeeListUI = new EmployeeListUI();
         employeeListUI.Search = txtEmployeeSearch.Text;
         DataTable dtb = employeeListBAL.GetEmployeeListBySearchParameters(employeeListUI);
         if (dtb.Rows.Count > 0 && dtb != null)
         {
             gvEmployeeSearch.DataSource = dtb;
             gvEmployeeSearch.DataBind();
             divEmployeeSearchError.Visible = false;
         }
         else
         {
             divEmployeeSearchError.Visible = true;
             lblEmployeeSearchError.Text    = Resources.GlobalResource.msgNoRecordFound;
             gvEmployeeSearch.Visible       = false;
         }
     }
     catch (Exception exp)
     {
         logExcpUIobj.MethodName       = "SearchEmployeeList()";
         logExcpUIobj.ResourceName     = "Assets_Asset_AssetForm.CS";
         logExcpUIobj.RecordId         = "All";
         logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
         logExcpDALobj.SaveExceptionToDB(logExcpUIobj);
         log.Error("[Assets_Asset_AssetForm : SearchEmployeeList] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
     }
 }
コード例 #3
0
    public DataTable GetEmployeeListById(EmployeeListUI employeeListUI)
    {
        DataTable dtb = new DataTable();

        dtb = employeeListDAL.GetEmployeeListById(employeeListUI);
        return(dtb);
    }
コード例 #4
0
    public DataTable GetEmployeeListBySearchParameters(EmployeeListUI employeeListUI)
    {
        DataTable dtb = new DataTable();

        dtb = employeeListDAL.GetEmployeeListBySearchParameters(employeeListUI);
        return(dtb);
    }
コード例 #5
0
    private void BindListBySearchParameters(EmployeeListUI employeeListUI)
    {
        try
        {
            DataTable dtb = employeeListBAL.GetEmployeeListBySearchParameters(this.employeeListUI);


            if (dtb.Rows.Count > 0 && dtb != null)
            {
                gvData.DataSource = dtb;
                gvData.DataBind();
                divError.Visible = false;
                gvData.Visible   = true;
            }
            else
            {
                divError.Visible = true;
                lblError.Text    = Resources.GlobalResource.msgNoRecordFound;
                gvData.Visible   = false;
            }

            txtSearch.Text = "";
            txtSearch.Focus();
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "BindListBySearchParameters()";
            logExcpUIobj.ResourceName     = "Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeList.CS";
            logExcpUIobj.RecordId         = "All";
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[Finance_Accounts_Payable_Employee_Supplier_Master_Creation_EmployeeList : BindListBySearchParameters] An error occured in the processing of Record. Details : [" + exp.ToString() + "]");
        }
    }
コード例 #6
0
    private void OnEmployeeCell(ButtonScript obj, object args, int param1, int param2)
    {
        EmployeeCellUI cell = obj.GetComponent <EmployeeCellUI> ();

        if (cell == null || cell.Employee == null)
        {
            return;
        }

        if (selectObj == null)
        {
            selectObj = obj.gameObject;
            selectObj.transform.FindChild("select").gameObject.SetActive(true);
        }
        else if (selectObj != obj.gameObject)
        {
            selectObj.transform.FindChild("select").gameObject.SetActive(false);
        }

        Employee employee = cell.Employee;

        if (employee == null)
        {
            return;
        }
        employee = GamePlayer.Instance.GetEmployeeById(employee.InstId);
        EmployessSystem.instance.CurEmployee = employee;
        EmployeeListUI.ShowMe();
    }
コード例 #7
0
    IEnumerator DelayOneClick()
    {
        yield return(new WaitForSeconds(0.3f));

        if (!bDouble)
        {
            EmployeeListUI.ShowMe();
        }
    }
コード例 #8
0
    public DataTable GetEmployeeListById(EmployeeListUI employeeListUI)
    {
        DataSet   ds   = new DataSet();
        DataTable dtbl = new DataTable();

        //Boolean result = false;
        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SqlCommand sqlCmd = new SqlCommand("SP_Employee_SelectById", SupportCon);
                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@@tbl_EmployeeId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@@tbl_EmployeeId"].Value = employeeListUI.Tbl_EmployeeId;

                using (SqlDataAdapter adapter = new SqlDataAdapter(sqlCmd))
                {
                    adapter.Fill(ds);
                }
            }
            if (ds.Tables.Count > 0)
            {
                dtbl = ds.Tables[0];
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "getEmployeeListById()";
            logExcpUIobj.ResourceName     = "EmployeeListDAL.CS";
            logExcpUIobj.RecordId         = employeeListUI.Tbl_EmployeeId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[EmployeeListDAL : getEmployeeListById] An error occured in the processing of Record Id : " + employeeListUI.Tbl_EmployeeId + ". Details : [" + exp.ToString() + "]");
        }
        finally
        {
            ds.Dispose();
        }

        return(dtbl);
    }
コード例 #9
0
    public int DeleteEmployee(EmployeeListUI employeeListUI)
    {
        int result = 0;

        try
        {
            using (SqlConnection SupportCon = new SqlConnection(connectionString))
            {
                SupportCon.Open();
                SqlCommand sqlCmd = new SqlCommand("SP_Employee_Delete", SupportCon);

                sqlCmd.CommandType    = CommandType.StoredProcedure;
                sqlCmd.CommandTimeout = commandTimeout;

                sqlCmd.Parameters.Add("@tbl_EmployeeId", SqlDbType.NVarChar);
                sqlCmd.Parameters["@tbl_EmployeeId"].Value = employeeListUI.Tbl_EmployeeId;

                result = sqlCmd.ExecuteNonQuery();

                sqlCmd.Dispose();
                SupportCon.Close();
            }
        }
        catch (Exception exp)
        {
            logExcpUIobj.MethodName       = "DeleteEmployee()";
            logExcpUIobj.ResourceName     = "EmployeeListDAL.CS";
            logExcpUIobj.RecordId         = employeeListUI.Tbl_EmployeeId;
            logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString();
            logExcpDALobj.SaveExceptionToDB(logExcpUIobj);

            log.Error("[EmployeeListDAL : DeleteEmployee] An error occured in the processing of Record Id : " + employeeListUI.Tbl_EmployeeId + ". Details : [" + exp.ToString() + "]");
        }

        return(result);
    }