Bangla Info and Employee serach

This commit is contained in:
mashfiq 2025-02-27 17:11:40 +06:00
parent a3c8a22703
commit f8882b172b
5 changed files with 28 additions and 12 deletions

View File

@ -730,7 +730,8 @@ namespace HRM.DA
}
internal static void UpdateBanglaContactInformation(TransactionContext tc, List<object> employeBanglaInfo)
{
tc.ExecuteNonQuery("UPDATE EMPCONTACT SET presentPOInBangla = %s, presentAddressInBangla = %s, parmanentPOInBangla = %s, permanentAddressInBangla =%s WHERE EMPLOYEEID = %s", employeBanglaInfo[1], employeBanglaInfo[2], employeBanglaInfo[3], employeBanglaInfo[4], employeBanglaInfo[0]);
string sql = SQLParser.MakeSQL("UPDATE EMPCONTACT SET presentPOInBangla = %s, presentAddressInBangla = %s, parmanentPOInBangla = %s, permanentAddressInBangla =%s WHERE EMPLOYEEID = %n", employeBanglaInfo[1], employeBanglaInfo[2], employeBanglaInfo[3], employeBanglaInfo[4], employeBanglaInfo[0]);
tc.ExecuteNonQuery(sql);
}
internal static IDataReader GetByEmpIDs(TransactionContext tc, string empIDs)

View File

@ -374,9 +374,10 @@ END;";
//orderby = "EmployeeNo";
//Using TOP
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%"));
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo LIKE %s", ( code + "%")); // Using LIKE Operator
sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", ( code)); // Without Using LIKE Operator
orderby = "EmployeeNo";
top = "TOP 15";
top = "TOP 5";
//Without suggestion
//sqlClause = SQLParser.TagSQL(sqlClause) + SQLParser.MakeSQL("EmployeeNo = %s", code );

View File

@ -534,12 +534,12 @@
class="bangla-font" pInputText style="width:100%" type="text">
</div>
<div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
<!-- <div class="p-col-12 p-md-12 p-lg-12" style="margin: auto;" align="right">
<button class="k-button k-primary" kendoButton icon="save"
(click)="saveBanglaPersonalInformation()">
Save
</button>
</div>
</div> -->
</div>
</form>
<form [formGroup]="contactForm">

View File

@ -578,8 +578,9 @@ export class GeneralComponent implements OnInit {
)
}
SaveBanglaContactInformation() {
this.saveBanglaPersonalInformation();
const data = {
employeeNo: this.employeeService.hrEmployee.employeeNo,
employeeID: this.employeeService.hrEmployee.id,
presentPOInBangla: this.contact.presentPOInBangla,
presentAddressInBangla: this.contact.presentAddressInBangla,
parmanentPOInBangla: this.contact.parmanentPOInBangla,

View File

@ -2085,7 +2085,7 @@ namespace HRM.UI.Controllers
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
var item = Newtonsoft.Json.JsonConvert.DeserializeObject(Convert.ToString(data));
string employeeNo = (string)item["employeeNo"].ToObject<string>();
int employeeID = Convert.ToInt32(item["employeeID"].ToObject<string>());
string presentPOInBangla = (string)item["presentPOInBangla"].ToObject<string>();
string presentAddressInBangla = (string)item["presentAddressInBangla"].ToObject<string>();
string parmanentPOInBangla = (string)item["parmanentPOInBangla"].ToObject<string>();
@ -2095,7 +2095,7 @@ namespace HRM.UI.Controllers
int ModifiedBy = currentUser.UserID;
List<object> employeBanglaInfo = new List<object>();
employeBanglaInfo.Add(employeeNo);
employeBanglaInfo.Add(employeeID);
employeBanglaInfo.Add(presentPOInBangla);
employeBanglaInfo.Add(presentAddressInBangla);
employeBanglaInfo.Add(parmanentPOInBangla);
@ -2105,7 +2105,20 @@ namespace HRM.UI.Controllers
try
{
EmpContact contact = _hrEmployeeService.GetEmpContacts(employeeID).FirstOrDefault();
if(contact != null)
new EmployeeService().UpdateBanglaContactInformation(employeBanglaInfo);
else
{
EmpContact ec = new EmpContact();
ec.EmployeeID = employeeID;
ec.PresentPOInBangla = presentPOInBangla;
ec.ParmanentPOInBangla = parmanentPOInBangla;
ec.PresentAddressInBangla = presentAddressInBangla;
ec.PermanentAddressInBangla = presentAddressInBangla;
_hrEmployeeService.SaveContact(ec);
}
}
catch (Exception ex)
{